3 ms·
Some with JavaScript timezone specific date times. My solution is to generally favour https://www.npmjs.com/package/@date-fns/utc https://www.npmjs.com/package
by bhouston 2y ago
Some with JavaScript timezone specific date times. My solution is to generally favour https://www.npmjs.com/package/@date-fns/utc https://www.npmjs.com/package/@date-fns/utc so that my code works the same without any effort in any timezone.
- mhink 2y agoThe trouble is when you have to deal with timezone-aware business logic. `date-fns-tz` does exist, but the amount of brain contortions required to keep track of everything is frankly exhausting, not to mention error-prone. Suffice it to say that I'm waiting with bated breath on the Temporal API (https://github.com/tc39/proposal-temporal https://github.com/tc39/proposal-temporal).
- PaulHoule 2y agoYep, I am in the Zulu habit.