Hacker News new | past | comments | ask | show | jobs | submit login

> Any local time calculations will need to take into account which country the user is currently in, whether the country has passed a law terminating daylight savings time, and whether the law has now taken effect.

I mean, isn't this why stuff such as tzdata exist? Countries already do this. Not every country in the world is already following DST, so you must know which country the time calculation being performed on, because the result may vary. In fact, it's interesting to navigate through the public tz mailing list [1] because it turns out that countries or regions along the world still like to change whether DST is being enforced or not, and if they enforce it, at which point of the year the clock shifts forward or backward.

Any local time calculation that doesn't already take into account the region and the current year could be wrong, that's why getting timezones right in software is difficult.

[1]: https://mm.icann.org/pipermail/tz/

Applications are open for YC Winter 2022

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact