2 ms·
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
by Joker_vD 6y ago
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.
- kevinmgranger 6y agoDoesn'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!)
- Joker_vD 6y agoIt does, but, eh, I mean, read the accepted answer: apparently, the past is rather unpredictable.