Weird timestamp behaviour or i don't understand something..
Hi! Can you help me with an issue?
We have a countdown on this page: https://dashboard.babywhale.meme/, counting down to January 23, 17:00 UTC.
The problem is with different time zones: the time difference varies between them.
How can I implement this properly? Here’s what I’ve written, but it doesn’t work correctly for other time zones:
We have a countdown on this page: https://dashboard.babywhale.meme/, counting down to January 23, 17:00 UTC.
The problem is with different time zones: the time difference varies between them.
How can I implement this properly? Here’s what I’ve written, but it doesn’t work correctly for other time zones:
2 Replies
Are you sure this is right?
Are you sure this is in UTC?
https://day.js.org/docs/en/parse/utc
By default, Day.js parses and displays in local time. If you want to parse or display a date-time in UTC, you can use dayjs.utc() instead of dayjs().
UTC · Day.js
By default, Day.js parses and displays in local time.