I was going through the release notes of the new Python 3.12 version the other day, and one item caught my attention in the deprecations section:datetime.datetime’s utcnow() and utcfromtimestamp()…
The only use I can see for naive date times is you just read the date out of an old sql database, but it shouldn’t leave the function naive, it should be converted first.
Python’s timezone handling is probably my only complaint about the language. I shouldn’t need to use libraries just to have timezones.
I agree.
The only use I can see for naive date times is you just read the date out of an old sql database, but it shouldn’t leave the function naive, it should be converted first.
Python’s timezone handling is probably my only complaint about the language. I shouldn’t need to use libraries just to have timezones.