3 ms·
Indeed, structural changes to timezones also need to be handled. Temporal has a good approach here https://tc39.es/proposal-temporal/docs/ambiguity.html#ambigui
by ariebovenberg 3y ago
Indeed, structural changes to timezones also need to be handled. Temporal has a good approach here https://tc39.es/proposal-temporal/docs/ambiguity.html#ambiguity-caused-by-permanent-changes-to-a-time-zone-definition https://tc39.es/proposal-temporal/docs/ambiguity.html#ambigu....
Basically:
- Store the offset and the tz ID
- When deserializing, allow explicit choice what to do: keep the offset (i.e. same moment in time) or keep the local time (i.e. same time on the 'wall clock')