Support ISO 8601 in new `<t:>` time formatter.
Discord has a new feature in chat that I was made aware of the other day: You can use a new formatting command:
<t:[timestamp]>
to have the Discord client format times for each individual user. This is a *fantastic* change, but there's a little bit of a wart. The only timestamp format it seems to accept at this time is a Unix timestamp. Unix timestamps are "the number of seconds that have elapsed since the Unix epoch, minus leap seconds; the Unix epoch is 00:00:00 UTC on 1 January 1970 (an arbitrary date)" ( https://en.wikipedia.org/wiki/Unix_time ).
Your typical Unix timestamp is just a big long number. Here's a picture I took this morning:
That's not very friendly for humans to read or write, which makes it difficult to whip out a message that contains a time reference without consulting a time converter like the one above.
My proposed solution is to allow this new formatter to *also* take ISO 8601 timestamps ( https://en.wikipedia.org/wiki/ISO_8601 ). ISO 8601 timestamps are much easier for humans to read, and correspondingly, much easier to write. The time in the picture above, is written as
2021-07-16T08:35:36-07:00
I actually have a chance of being able to write an absolute time reference without needing to consult with a timestamp converter. This would be helpful for anyone that finds themselves regularly needing to write dates to be consumed by other timezones, *especially* in international contexts. The Unix timestamp format is okay if you only need to use this feature rarely, or have it programmed as the output of a bot, but it would quickly become a pain for anyone that needs to write dates regularly.
Please sign in to leave a comment.
Comments
0 comments