Message315418
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()` case:
"""
Note There is no method to obtain the POSIX timestamp directly from a naive datetime instance representing UTC time. If your application uses this convention and your system timezone is not set to UTC, you can obtain the POSIX timestamp by supplying tzinfo=timezone.utc:
timestamp = dt.replace(tzinfo=timezone.utc).timestamp()
or by calculating the timestamp directly:
timestamp = (dt - datetime(1970, 1, 1)) / timedelta(seconds=1)
""" |
|
Date |
User |
Action |
Args |
2018-04-17 20:58:56 | tim.peters | set | recipients:
+ tim.peters, ned.deily, Han Shaowen |
2018-04-17 20:58:56 | tim.peters | set | messageid: <1523998736.21.0.682650639539.issue33293@psf.upfronthosting.co.za> |
2018-04-17 20:58:56 | tim.peters | link | issue33293 messages |
2018-04-17 20:58:56 | tim.peters | create | |
|