Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

How is it not precisely defined? Lat/long to timezone ought to work... timezones have precise boundaries that cover the whole earth, no?


> timezones have precise boundaries that cover the whole earth, no?

Not only is that not true, but there are places on the earth where one country may think the timezone is X, but in another country it is illegal to claim that the timezone is X.

This happens most notably with China, which defines the entire country to be in a single timezone, and is engaged in multiple border disputes.


Similarly for many disputed territories in Antarctica, with the added fun of "the south pole region is special". But of course that is a very marginal topic.


I maintain https://github.com/photostructure/tz-lookup which does this task.

*Every single time* I update the tz source file some arbitrary set of zone names and offsets change. Look at the churn and enjoy the schadenfreude: https://github.com/photostructure/tz-lookup/commits/main/tes...


A triple (Lat/Lon/UTC Date) <-> TimeZone at the very least.

Time zones are political | * social* especially in the twilight zone between two otherwise well defined zones.

If a country is mostly in TimeZone X then often an extrusion that goes well into TimeZone Y will remain with clocks aligned to TZ-X unless some local political change is made (to be more or less sensible).

See (current TimeZone Map):

https://www.timeanddate.com/time/map/

and note that cities have changed time zones (not daylight savings changes, actual changes to core time zone) in the past and will almostly certainly do so again in the future.


The changing of zones isn't a problem, that's why we're using lat/lon, but if the nearby countries can't agree on what time it is...that's an issue.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

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

Search: