2 ms·
The situation the author is considering, is a future event in some geographical location in which the rules for the timezone change. In my honest opinion this i
by plank 5y ago
The situation the author is considering, is a future event in some geographical location in which the rules for the timezone change.
In my honest opinion this is a non-solvable problem. So yes, storing in UTC or storing in local time is not a silver bullet. Because, depending on the event, there is a different wherewolve.
If the event is e.g. the opening hours of a store, chances are that local time works. Indeed: if e.g. the Netherlands change the time zone rules, the local shop may continue to use the 09:00 hour local time as the time to opening the shops. But if it is e.g. the time that the last ‘window’ of delivering a package to the delivery company such that it will be on time for delivery to neighbouring country (say) Germany, then this will depend on the (changes to the rules of the) time zone in that country. Which may be different then the (changes to the rules of the) local time zone in which the event occurs.
So, when planning ahead, one takes into account the knowledge of that time to make a assumption of when the event will take place. If the timezone rules change, one should reexamine which assumption works best.
If the event is e.g. the time the moon will be eclipsed, UTC works best (without fails). If it is some local event not depended on anything outside the area in which the time zone rules apply, local time probably works best.
But really, really knowing for certain? I would rather store (future) time in UTC and then consider whether changing time zone rules should or should not apply, as opposed to designing a system that could do this correctly in any situation…