How to coordinate across timezones in Discord with timestamps

Coordinating across timezones can be hard – making sure everyone shows up in their local time is key. Thankfully Discord lets you share timestamps – and Apple's Shortcuts can generate them easily. Here's how.

If you’re trying to coordinate with other folks over Discord, you might run into timezone issues – often people in disparate communities live all across the world, and trying to specify exactly when everyone should arrive in their relative time can actually prove to be quite hard.

Thankfully, the folks at Discord ran into this enough themselves that a solution is actually built into the application: a special <t:{timestamp}> message (plus an optional :{format} you can append).

Once you send this timestamp, each person will see the correct time in their timezone. Great!

Now you just need a timestamp… which you can get… how??

Oddly, Discord has no way of actually creating this message itself – it requires a Unix timestamp, which seems to be intended for developers who might be programming a chatbot, for example, rather than everyday users.

Thankfully, you can create that timestamp—and take advantage of Discord’s formatting options—using Apple’s Shortcuts app. Here’s how (plus, what a Unix timestamp really is in the first place):

Unix Timestamps and the Epoch

In computer programming, calculating the difference between time values is a common problem to solve – but how do computers subtract 1:30 pm from 3:00pm? Or this Tuesday at 2 from last Thursday at 4? The method relies on what’s called Unix time, a mathematical representation of date and time values.

Forgive my layman’s explanation, but Unix time works in two ways – converting the actual given time values to total seconds, the subtracting those values against a common date for comparison purposes.

In the simplest form, with time only, if you started at midnight at waited 90 minutes, you could break that down into total seconds (90×60=5400) – then at 2 hours (120×60=7200), then difference is 7200-5400=1800 seconds, or 1800/60=30 minutes. This difference is obvious in this example, but try calculating the difference between 3:39 am 10:57 pm real quick and get back to me.

Once multiple dates are involved, however, you need a common starting point – early programmers decided to solve the “common point in time” problem by agreeing on one specific date/time against which to measure all dates and time values, giving every computer ever a common point to calculate from – and they chose midnight of January 1st, 1970, which is referred to as the Epoch.

Editor’s note: I’ll be honest, the first time I heard this, I legitimately asked if this is real because it almost sounds fake – but it’s super real. But the longer you think about it, what other method works better?

I’m writing this sentence on Wednesday, May 31st at 1:05 pm – which corresponds to 1,685,563,539 seconds since midnight of January 1st, 1970 – or a Unix timestamp of 1685563539. Apparently, 53 years is 1,671,408,000 seconds, and the remaining 14,155,539 add up to the last ~6 months since January 1st.

Now, two minutes and some seconds later, it’s 1:07pm – and it’s been 1,685,563,637 seconds since the Epoch, or a Unix timestamp of 1685563637.

Plus, just to be truly exact, we can actually see those “some seconds” using the end 3 values – 637-549=88 seconds apart, so these moments are actually less than two minutes apart, but shown across two different minute periods.

Generating Unix Timestamps in Shortcuts

In Shortcuts, you can accomplish this same calculation using the Date and Get Time Between Dates actions – by specifying the Epoch, then getting the time between then and a specified date in Seconds.

First, the Date action should be added and changed from Current Date to Specified Date. Then, add in 1970-01-01T00:00:00Z, which accounts for the Epoch time plus any timezone differences using Z – Shortcuts will show a tooltip at the bottom of the screen showing the inputted date result (in your relative timezone).

Then, use Get Time Between Dates, but make sure to swap the first value with your Date variable and place the specified time in the second date value. In my sample shortcut, the Current Date is used, but in the following Discord shortcut, I use a provided input from the Ask For Input action.

Then, make sure to change the format from Minutes to Seconds – if you run this sample shortcut, you’ll get your current time in total seconds since the Epoch.

Sending Unix Timestamp Messages in Discord

In Discord, this Unix timestamp value can then be used in a special message using the <t:{timestamp}> format.

Once it’s sent, users will not see \<t:123456789>, but instead see the actual specified time but displayed in their own timezone.

For example, if I’m in Pacific Time (PDT) at UTC-07:00 and say I’ll show up at 12:20pm, Discord will show my timestamp to someone in Eastern Time (EDT) at UTC-4:00 (a +3 hour difference) as 3:20pm.

This works great because, rather than the message sender having to calculate every possible timezone difference, then can specify one timestamp, and each person who needs the conversion will have it automatically applied.

Adding Format Patterns

Going further, Discord also allows you to format your timestamps by appending a t, D, or other format pattern to the message, creating something such as <t:1618953630:F> to have it show as Tuesday, 20 April 2021 16:20 in the end.

The full list is shown in the developer documentation, but my personal favorites are t for short time, F for the full time shown above, and R for relative – saying I’ll be there in 2 hours is great.

In order to make this all as accessible as possible, I built all these formatting options into my shortcut, which also shows all the example formats in the menu itself so you aren’t left guessing. My shortcut also works by asking you to specify a specific date, in case you want to use a time in the future.

I’ve assigned this shortcut to Control + Option + Command + T on my Mac as well, making it easy to hit the modifier keys, arrow through the menu for my choice for format, and paste the timestamp into Discord right away.

Plus, the shortcut is designed to work as a function from inside other shortcuts – it will avoid showing its menu if you pass one of the format pattern values in as input using Run Shortcut – if you want just the short time, for example, you can use a Text action, the letter t, and Run Shortcut.

Coordinate your Discord communication

For Discord users, I hope this shortcut saves you from any coordination errors that might otherwise arise – showing up at the right time is half the battle sometimes!

For Shortcuts users, you should remember the Unix timestamp method built off Get Time Between Dates – once you get into any deeper levels of programming that involve dates and times, you’ll want to know how to generate a Unix timestamp and get a “true” datetime value.

Get the Copy timestamp for Discord shortcut in the Discord folder of my Shortcuts Library.

Posts You Might Like

Guides you through the process of filing Feedback to Apple (previously called Radar). This explains the process in a pop-up, has you type up the problem through a series of prompts before even starting a new ticket, then guides you again on how to easily fill out the form, before finally opening into Feedback.