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()…
While it would be ideal to have all datetime fields in databases and other data stores be time zone aware, that is certainly not the case. Also, SQLite (and probably others) do not have great support for time zones and it’s recommended to store datetimes as UTC (typically unix timestamps).
Deprecating utcnow was a good idea, but they should have replaced it with naive_utcnow. Oh well.
@Sigmatics Habits can be unlearned over a few generations. Doesn’t mean in becomes practical all if a sudden. It’s just messy to say “I’ll do this tomorrow” when “tomorrow” might mean “before I go to bed”.
“See you Monday!”
“Eh, before or after sleep on Monday?”
It’s just not viable. It requires us to think differently about what a date is, returning the original issue: different people living at different dates.
While it would be ideal to have all datetime fields in databases and other data stores be time zone aware, that is certainly not the case. Also, SQLite (and probably others) do not have great support for time zones and it’s recommended to store datetimes as UTC (typically unix timestamps).
Deprecating
utcnow
was a good idea, but they should have replaced it withnaive_utcnow
. Oh well.Timezones are a disease and should be eradicated. I will die on this hill.
Agreed. I’m an American and wish we could just all be on UTC. Yeah, my workday would start at like 0200, but that’s a sacrifice I’m willing to make.
Everyone on UTC sounds like such a great idea that would solve so many problems.
Unfortunately humans are so dependent on daylight and the day night cycle that it will never work
deleted by creator
Yeah that’s kind of what I meant. People like their days to start at the same time every day. We are creatures of habit.
@Sigmatics Habits can be unlearned over a few generations. Doesn’t mean in becomes practical all if a sudden. It’s just messy to say “I’ll do this tomorrow” when “tomorrow” might mean “before I go to bed”.
“See you Monday!”
“Eh, before or after sleep on Monday?”
It’s just not viable. It requires us to think differently about what a date is, returning the original issue: different people living at different dates.
I agree. I hate timezones so much
@BeardedGingerWonder will you adapt your time to be 7 hours later?
Thought so.
You thought what?