|
|
|
|
|
by pydry
2250 days ago
|
|
I'd consider any datetimes that have an implicit timezone that isn't or might not be UTC a bug in any system. This isn't restricted to python. Servers that spit out logs with timestamps, for instance, should be spitting out UTC. It makes sense to build systems that deal with timezones at the very edges (and sometimes not even then) and use UTC for everything else. It's simpler that way. |
|
The datetime module provides `timezone.utc` to be used whenever you want to have datetimes _in utc_, but it needs to be explicitly used by the programmer.