3 ms·
Not quite though. If you have a calendar app, and someone has an appointment for 1 Jan 2018 14:00 LTM (LTM being a zone I just made up). Now suppose than in the
by rocqua 10y ago
Not quite though. If you have a calendar app, and someone has an appointment for 1 Jan 2018 14:00 LTM (LTM being a zone I just made up). Now suppose than in the next year, the LTM timezone changes. This sometimes happens to ease international commerce.
In the case of such a change, I'd argue the time-instant should change and the timezone representation should be constant.
- rusk 10y agoExcellent corner case. Here it comes down to how you model the storage of your appointments. Since the issue is framed within a calendar the "instant" itself is not of primary concern, but the position within that calendar. This is also how the likes of "chron" model scheduling of tasks. I found this so hard to wrap my head around at first precisely because I was used to dealing with time "as a programmer" from the inside out. Of course when you're scheduling a repeating task that you want to happen "at midnight" or "on a Monday morning" it makes more sense to specify in this top-down manner. I might categorise such things as "a presentation layer" concern, but as you point out, in these cases your moment in time is stored as a calendar reference.