Hacker News new | ask | show | jobs
by rmc 5288 days ago
> there was always an accurate one-to-one mapping between a Unix time and a time in each time zone

That's not true in general. When the "clocks go backwards", there are two 1:30ams on that morning.

The bug this comment is refering to, is where you convert from local to UTC as soon as the user enters the datetime, and then use that from then on. Since the "local to UTC" conversion might change between now and the date, as the tzdata time is updated, you might get this bug.

1 comments

It seems to me that it's impossible to solve this bug in the general case. If the user enters March 15, 2012 before the switch, should that become March 16, 2012 after the switch, or stay March 15? Either scenario could be correct depending on the intent of the date. Messy.