4 ms·
This article always bugged me, because it needlessly makes things seem complicated. There are times when you are trying to represent a moment in time, and then
by cbsmith 2y ago
This article always bugged me, because it needlessly makes things seem complicated. There are times when you are trying to represent a moment in time, and then there are times when you are trying to represent a moment in a calendar (which is not the same as a moment in time). It's all about capturing intent and using the right tool for the job.
The moment in time case is pretty straightforward. The moment in a calendar case can get horribly complex because calendars are... very human constructs, and there are challenges capturing the entirety of human intent (did you mean for the position on the calendar to remain fixed even if the calendar changes? what about leap seconds? etc.), because often humans aren't even sure about their intent.
- karmakaze 2y agoYeah I was about to say the same, why make such a contrived example. A much simpler example is the case of iPhone alarms going off at the wrong time. A different real-world example that I like to give is when I was working at a photo sharing site that had global reach. We had a debate about how to store, convert, and/or display datetimes and I opted for local date/time. Ideally want to store both the local time and place of the photo which allows calculating every other time format. Even without the place, it still makes sense to show night time photos with their local time, and new years celebration photos at midnight.