[issue41118] datetime object does not preserve POSIX timestamp

2020-06-25 Thread Paul Ganssle
Paul Ganssle added the comment: There's a pretty clear warning on the documentation that utcfromtimestamp is unsuitable for this purpose: https://docs.python.org/3/library/datetime.html#datetime.datetime.utcfromtimestamp What you want is a datetime that knows what time zone it's in, so that

[issue41118] datetime object does not preserve POSIX timestamp

2020-06-25 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +belopolsky, p-ganssle ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue41118] datetime object does not preserve POSIX timestamp

2020-06-25 Thread Grant Petty
New submission from Grant Petty : For complete context, see https://stackoverflow.com/questions/62582386/how-do-i-get-a-naive-datetime-object-that-correctly-uses-utc-inputs-and-preserve Short version: It does not seem correct that a datetime object produced *from* a POSIX timestamp using