[issue46319] datetime.utcnow() should return a timezone aware datetime

2022-01-09 Thread Paul Ganssle
Paul Ganssle added the comment: Yes, this is the documented behavior, including a warning against using UTC now in the documentation! There is some possibility of removing utcnow entirely as an "attractive nuisance", but I suspect that this will lead to much consternation and

[issue46319] datetime.utcnow() should return a timezone aware datetime

2022-01-09 Thread Martin Panter
Martin Panter added the comment: Perhaps this is a duplicate of Issue 12756? -- nosy: +martin.panter superseder: -> datetime.datetime.utcnow should return a UTC timestamp ___ Python tracker

[issue46319] datetime.utcnow() should return a timezone aware datetime

2022-01-09 Thread Alex Waygood
Change by Alex Waygood : -- nosy: +belopolsky, p-ganssle versions: -Python 3.7, Python 3.8 ___ Python tracker ___ ___

[issue46319] datetime.utcnow() should return a timezone aware datetime

2022-01-09 Thread Tony Rice
New submission from Tony Rice : datetime.datetime.utcnow() returns a timezone naive datetime, this is counter-intuitive since you are logically dealing with a known timezone. I suspect this was implemented this way for fidelity with the rest of datetime.datetime (which returns timezone