Re:Why is subtracting these two times in 1927 giving a stran...
by Joker_vD on Monday November 02, 2020 @10:12AM
(#24968910)
And for the event in the past, respectively, you need datetime and the then-effective offset, not timezone, if you want to know the "what was the local time on the actual physical wall clock?". Unless you're sure the tzdata were correct when the timestamp was taken, and your current tzdata have correct historical info, you can't just take UTC timestamp+timezone and convert it to local time. And I've seen enough machines that had deliberately wrong timezones for some time.
[ Parent
| on HN ]
Re:Why is subtracting these two times in 1927 giving a stran...
by kevinmgranger on Monday November 02, 2020 @10:29AM
(#24969110)
Doesn't the olson DB track when offsets changed based on UTC time, and thus UTC timestamp+timezone is enough?
(If your datetime library handles historical information in the DB correctly, that is!)