Hacker News new | ask | show | jobs
by de_Selby 1955 days ago
> Let's take take a look, using the disastrously bad unix libc timezone tools

Are there any more examples of them causing issues to warrant being called "disastrously bad"? This post just seems to have one example of bad error handling when they the TZ env var is set incorrectly.

I'm genuinely interested if they actually are bad since they are used a lot.

1 comments

They usually work because people check and notice mistakes.

It gets worse now that you have countries next to each other that are out of sync on daylight saving - America/Los Angeles doesn’t work for those south of the border anymore - but you won’t notice except two weeks a year.

Strangely I’ve noticed some systems give you WAY more cities than in the standard library - and I’m not sure why. Linode had way more options than just America/Chicago but didn’t have St Paul.

And trying to schedule things in advance across the daylight saving time difference is even more confusing.

Before about 1920, many US cities had their own time. Since then, there are far fewer time zones, mostly uniform across states, and named after a large city. Similarly in other countries. The large version of the database is only needed if you're trying to print very old dates.