2 ms·
Time zones are definitely annoying to deal with in software, but conceptually they’ve always seemed like the least bad option. The thing that’s annoying is that
by strongpigeon 3y ago
Time zones are definitely annoying to deal with in software, but conceptually they’ve always seemed like the least bad option. The thing that’s annoying is that they’re always changing and sometime on fairly short notice.
The things that have worked for me are:
- Storing dates as dates, not datetimes. Sure, you can make sure you always treat them as local/timezone less, but someone at some point will apply a timezone to them and it will break.
- Integrate pulling the latest zoneinfo as part of your CI.
- Store everything as UTC and use the client’s TZ for rendering.
How to deal with customers changing their timezone is always tricky too. “Do they want this to run at 3PM local, or 3PM of their previous TZ?”…