[issue39970] Combined behavior of datetime.datetime.timestamp() and datetime.datetime.utcnow() on non-UTC timezoned machines

2020-03-17 Thread Yi Luan
Yi Luan added the comment: Hi Paul, Yes, I totally agree with you, and I should follow your advice and not to pass timestamps as representations of arbitrary datetime for interop usage. However in my particular case, I'm not the person who can make such type of decisions. Perhaps I&#

[issue39970] Combined behavior of datetime.datetime.timestamp() and datetime.datetime.utcnow() on non-UTC timezoned machines

2020-03-15 Thread Yi Luan
Yi Luan added the comment: Sorry to make changes again but I typed his name wrong = =! It's Scott Meyers. Apologies. -- ___ Python tracker <https://bugs.python.org/is

[issue39970] Combined behavior of datetime.datetime.timestamp() and datetime.datetime.utcnow() on non-UTC timezoned machines

2020-03-15 Thread Yi Luan
Yi Luan added the comment: Hi, Thanks for taking time to reply my question. I suppose the title I put was a bit confusing. And the recommended way to generate time in UTC does solve this issue, in Python. However the message I was trying to convey is, the behavior of timestamp() is one

[issue39970] Combined behavior of datetime.datetime.timestamp() and datetime.datetime.utcnow() on non-UTC timezoned machines

2020-03-15 Thread Yi Luan
New submission from Yi Luan : Hello, Apologies if this was a duplicate issue. I guess the most concise way of saying this is that when doing: >>> datetime.datetime.utcnow().timestamp() on a machine whose local time isn't the UTC time, the above code will not return the cor