Message309703
One thing I think that is fairly common is the desire to get the current datetime only up to a current precision, so you see a lot of things in, say, `dateutil` like this:
dt = datetime.now().replace(hours=0, minutes=0, seconds=0, microseconds=0)
Or:
dt = datetime.now().replace(microseconds=0)
I think it would make sense to add a `precision` keyword argument, similar to the `timespec` argument to isoformat (https://docs.python.org/3/library/datetime.html#datetime.datetime.isoformat), then you could just do:
dt = datetime.now(precision='day')
And get the current date as a datetime. |
|
Date |
User |
Action |
Args |
2018-01-09 15:46:50 | p-ganssle | set | recipients:
+ p-ganssle, tim.peters, belopolsky |
2018-01-09 15:46:50 | p-ganssle | set | messageid: <1515512810.75.0.467229070634.issue32522@psf.upfronthosting.co.za> |
2018-01-09 15:46:50 | p-ganssle | link | issue32522 messages |
2018-01-09 15:46:50 | p-ganssle | create | |
|