Hacker News new | ask | show | jobs
by thristian 5256 days ago
dateutil includes tzinfo implementations 'tzutc' (whose offset is always zero), 'tzoffset' (whose offset is passed as a parameter) and 'tzlocal' (whose offset is the value of time.timezone). All these could easily and safely be implemented in the stdlib without having to push out updates every time the Olson timezone database has a new release.

It also contains tzinfo implementations that read timezone definitions from a system-wide copy of the Olson database (for most POSIX OSs) or the registry (for Windows-based OSs). These could also be added to the standard library without requiring regular Python updates, because the OS's usual timezone update system will take care of things.

Perhaps the stdlib can't possibly solve timezone issues in all possible cases, but it could be a lot more useful than it currently is.