hroptatyr / dateutils

nifty command line date and time utilities; fast date calculations and conversion in the shell
http://www.fresse.org/dateutils/
Other
612 stars 40 forks source link

dateutils.dconv might have a bug with converting non-24 hr times #93

Closed kihiukiragu closed 3 months ago

kihiukiragu commented 5 years ago

The following: dateutils.dconv -i '%d-%b-%y %I.%M.%S.%N %p' '26-JAN-19 12.02.23.823355000 AM’

Returns ‘2019-01-26T12:02:23’ but should return ‘2019-01-26T00:02:23’

hroptatyr commented 5 years ago

Hi kihiukiragu, thanks for the report. However, in the current release (0.4.5) this very example seems to report the correct value:

$ dateconv -i '%d-%b-%y %I.%M.%S.%N %p' '26-JAN-19 12.02.23.823355000 AM'                                            
2019-01-26T00:02:23
kihiukiragu commented 3 months ago

I'm late on this, confirmed, it works as expected.