[issue33293] Using datetime.datetime.utcnow().timestamp() in Python3.6.0 can't get correct UTC timestamp.

2018-04-17 Thread Han Shaowen
Han Shaowen added the comment: Hohoho, I found the full-version doc. This issue over. Thanks Tim, Ned and Brett. And sorry about something improper I said, I respect female Pythonista. -- ___ Python tracker

[issue33293] Using datetime.datetime.utcnow().timestamp() in Python3.6.0 can't get correct UTC timestamp.

2018-04-17 Thread Tim Peters
Tim Peters added the comment: docstrings give brief statements intended to jog your memory; they're not intended to be comprehensive docs. Read the actual documentation and see whether you're still confused. When you "assumed it is irrelevant to time zone", that was your

[issue33293] Using datetime.datetime.utcnow().timestamp() in Python3.6.0 can't get correct UTC timestamp.

2018-04-17 Thread Han Shaowen
Han Shaowen added the comment: Guys, what I said is the doc in help(datetime.timestamp) is 'Return POSIX timestamp as float.' So I assumed it is irrelevant to time zone, considering POSIX timestamp's definition. If it is then datetime.now and datetime.utcnow should

[issue33293] Using datetime.datetime.utcnow().timestamp() in Python3.6.0 can't get correct UTC timestamp.

2018-04-17 Thread Tim Peters
Tim Peters added the comment: Ned, I think this one is more the case that the OP didn't read the docs ;-) That said, there's a level of complexity here that seemingly can't be reduced: the distinctions between the `datetime` and `time` modules' views of the world, and

[issue33293] Using datetime.datetime.utcnow().timestamp() in Python3.6.0 can't get correct UTC timestamp.

2018-04-17 Thread Ned Deily
Ned Deily added the comment: Tim, do you think the docs should be changed and, if so, which sections? If you dictate, I'll type! -- ___ Python tracker

[issue33293] Using datetime.datetime.utcnow().timestamp() in Python3.6.0 can't get correct UTC timestamp.

2018-04-17 Thread Tim Peters
Tim Peters added the comment: I agree this isn't a bug (and it was right to close it). I expect the OP is confused about what the `.timestamp()` method does, though. This note in the docs directly address what happens in their problematic `datetime.utcnow().timestamp()`

[issue33293] Using datetime.datetime.utcnow().timestamp() in Python3.6.0 can't get correct UTC timestamp.

2018-04-17 Thread Ned Deily
Ned Deily added the comment: I am not sure I understand what behavior you are expecting. But datetime.now() is documented as returning "the current local date and time" (assuming no tx= argument is provided) while datetime.utcnow() returns "the current UTC date and time".

[issue33293] Using datetime.datetime.utcnow().timestamp() in Python3.6.0 can't get correct UTC timestamp.

2018-04-17 Thread Brett Cannon
Brett Cannon added the comment: And we do have women on the team, so please minimize the "fellas" comments. -- ___ Python tracker ___

[issue33293] Using datetime.datetime.utcnow().timestamp() in Python3.6.0 can't get correct UTC timestamp.

2018-04-17 Thread Brett Cannon
Brett Cannon added the comment: Are you seeing the same issue on Python 3.6.5? -- nosy: +belopolsky, brett.cannon ___ Python tracker

[issue33293] Using datetime.datetime.utcnow().timestamp() in Python3.6.0 can't get correct UTC timestamp.

2018-04-16 Thread Han Shaowen
New submission from Han Shaowen : What I am talking is like: Python 3.6.0 (default, Feb 28 2018, 15:41:04) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.39.2)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import time >>> from