3 ms·
That's exactly the point, but the other way around. If the timestamp is defined in local time (e.g. "a meeting is scheduled for 15:00 every second thursday") a
by detaro 10y ago
That's exactly the point, but the other way around.
If the timestamp is defined in local time (e.g. "a meeting is scheduled for 15:00 every second thursday") and you generate a list of the next events as UTC, and then the DST rules change, you have to go in and fix all the UTC timestamps for future events.
If you store local time + timezone name, the stored time doesn't have to change, and if you need it in UTC for display you can calculate it on the fly, using the most recent rules you know.
If intervals are more important (e.g. do something every 30 minutes, or exactly every 24 hours), then UTC is better, or if you are recording events as they happen.
- grzm 10y agoYou're right. For future events it does make sense to record the local time zone. Thanks for the clear explanation.