datetime seems to be broken WRT timezones (even when you add them)
Skip Montanaro
skip.montanaro at gmail.com
Mon Feb 10 18:52:59 EST 2020
> As best I can tell, Python has no means to make use of the system's
> timezone info. In order to make datetime "timezone aware", you need
> to manually create a subclass of datetime.tzinfo, whose methods return
> the correct values for the timezone you care about.
>
...
> Does Python have an alternative way to do the above, with correct
> results?
>
The datetime module's manipulation of timezones is pretty low-level. Maybe
try arrow?
https://arrow.readthedocs.io/en/latest/
Skip
>
More information about the Python-list
mailing list