How do I get a value of datetime.today() in Python that is “timezone aware”?
In the standard library, there is no cross-platform way to create aware timezones without creating your own timezone class. (Edit: Python 3.9 introduces zoneinfo in the standard library which does provide this functionality.) On Windows, there’s win32timezone.utcnow(), but that’s part of pywin32. I would rather suggest to use the pytz library, which has a constantly … Read more