4 ms·
The reason I would argue for always using UTC is that local time in a time that has timezones isn't clearly unambiguous. In fall, when you set the clock back an
by chucky 6y ago
The reason I would argue for always using UTC is that local time in a time that has timezones isn't clearly unambiguous. In fall, when you set the clock back an hour, suddenly the time 02-03 in the morning happens twice. So if you have an event at 02:13, it could have happened at either of the two 02:13's that happened during that night, and since you are using server local time, you won't necessarily be able to know which one afterwards.
Whether being able to figure this out afterwards is important depends on your use case, of course.
- ithkuil 6y agoThat's only a problem if the recorded (or rendered) date format doesn't include the timezone
- kd5bjo 6y agoUTC also has this problem, to a lesser degree. The length of its second is determined atomically, but it’s also guaranteed to stay within 0.9 seconds of solar time. Individual seconds are either skipped or repeated to maintain this guarantee in the face of solar clock drift. (cf. https://en.m.wikipedia.org/wiki/Leap_second https://en.m.wikipedia.org/wiki/Leap_second )
- zokier 6y agoIn UTC leap seconds are not ambiguous because seconds are not repeated > The extra second is displayed on UTC clocks as 23:59:60. Note how it's not 23:59:59 repeated, and thus fully unambiguous