Hacker News new | ask | show | jobs
by lucasmullens 2294 days ago
When you go one hour back for daylight savings, you can't tell with just epoch if it's the first or second time you're at that time. With timezones you can, since it switches between PST and PDT.
3 comments

This is fundamentally incorrect. Because UTC doesn't change, the two "identical" times are different UTC values.
What happened when you set an alarm for 2022 in CEST? The EU will very likely get rid of DST by then.

You alarm will be an hour off when you convert to UTC beforehand.

I don't know that much about epoch, but isn't the point of it to be completely independent of stuff like timezones or daylight savings? Doesn't it track every second since 1970 no matter if meanwhile time jumped back or forward in some countries?
UTC has leap seconds, but otherwise this is correct.
1:30PST and 1:30PDT bijectively map to distinct UTC timestamps.