|
|
|
|
|
by masklinn
5256 days ago
|
|
> For me, the most annoying thing about Python is that out of the box, AFAICT, you cannot get a TZ-aware datetime. That's because the stdlib would have to get updated every 3-6 months, which it is not. Hence delegating to e.g. pytz for timezones provision. > I don't know of any included solution for making TZ-aware datetime, short of writing your own subclasses for each timezone. There isn't indeed, because there can't be an stdlib-provided way to do this which is actually correct. |
|
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.