Closed danielballan closed 4 years ago
We currently only support a datetime.datetime object or a string formatted exactly as '%Y-%m-%d %H:%M:%S.%f'. It would be good to add support for times gives as:
datetime.datetime
'%Y-%m-%d %H:%M:%S.%f'
float
'%Y-%m-%d %H:%M:%S
'2020-01-01'
2020-01
datetime.date
close by #17
We currently only support a
datetime.datetime
object or a string formatted exactly as'%Y-%m-%d %H:%M:%S.%f'
. It would be good to add support for times gives as:float
representing seconds in the UNIX epoch)'%Y-%m-%d %H:%M:%S
(no miliseconds),'2020-01-01'
(just the date, no time),2020-01
(just the month) etc. See for example https://github.com/bluesky/databroker/blob/2f7c3900301450021f0f79512ddd7d673c348345/databroker/utils.py#L111-L116 and https://github.com/bluesky/databroker/blob/2f7c3900301450021f0f79512ddd7d673c348345/databroker/utils.py#L69-L75 for one way to do this.datetime.date
objects