Message309704
> dt = datetime.now(precision='day')
Why not creating a date and then convert it to a datetime object?
> dt = datetime.now().replace(microseconds=0)
Yeah, that one annoys me as well, but I learnt the .replace(microseconds=0) hack, or how to format without microseconds.
By the way, are you aware of Python 3.7 enhancement of .isoformat(), the new timespec parameter?
https://docs.python.org/dev/library/datetime.html#datetime.datetime.isoformat |
|
Date |
User |
Action |
Args |
2018-01-09 15:56:42 | vstinner | set | recipients:
+ vstinner, tim.peters, belopolsky, p-ganssle |
2018-01-09 15:56:42 | vstinner | set | messageid: <1515513402.38.0.467229070634.issue32522@psf.upfronthosting.co.za> |
2018-01-09 15:56:42 | vstinner | link | issue32522 messages |
2018-01-09 15:56:42 | vstinner | create | |
|