Hacker News new | ask | show | jobs
by masukomi 2294 days ago
epoch is INHERENTLY timestamped it's seconds since January 1, 1970 (midnight UTC/GMT). it'd be useless if it was just "you know midnight _somewhere_ on Jan 1 1970... pfft it was a long time ago. who cares"
1 comments

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.
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.