4 ms·
> Either use the tzdb name like America/New_York, or use an offset from UTC, depending on what you want. I bet storing an offset is far more pain, given that a
by larrik 6y ago
> Either use the tzdb name like America/New_York, or use an offset from UTC, depending on what you want.
I bet storing an offset is far more pain, given that anyone in a DST area will have 2 offsets per year.
- shadowgovt 6y agoOffsets can very easily be the wrong answer (though the author is quite correct that it depends on what you're trying to do). If your user intends to use one of the timezones that has a daylight savings calculation, the offset changes as the year goes on. Offsets can also change if the definition of the timezone itself changes (Russia ceased to use daylight savings in 2014). Offsets can be useful if one is attempting to record a historical incident, where the timezone had a particular-defined offset at the point in time the incident occurred (though for my money, I'd just convert that time to UTC on storage).
- followben 6y agoThis needs more upvotes.