Closed oroussel closed 6 years ago
Hello,
It seems dateconv does a wrong conversion if the hour number is 12, and using a 12-hour clock, when using %I and %p format. See eg. the table on the right of https://en.wikipedia.org/wiki/12-hour_clock.
dateconv
%I
%p
$ dateconv -V dateconv 0.4.2
$ dateconv -i "%I:%M:%S %p" "11:59:59 AM" 11:59:59 # Correct $ dateconv -i "%I:%M:%S %p" "12:00:01 PM" 00:00:01 # Incorrect, should be 12:00:01
$ dateconv -i "%I:%M:%S %p" "11:59:59 PM" 23:59:59 # Correct $ dateconv -i "%I:%M:%S %p" "12:00:01 AM" 12:00:01 # Incorrect, should be 00:00:01
Thanks for the bug report, Olivier. Well spotted. A fix is in master now (a75f2525).
Thanks for the quick feedback, and the quick fix :-). Your tool is really useful!
Hello,
It seems
dateconv
does a wrong conversion if the hour number is 12, and using a 12-hour clock, when using%I
and%p
format. See eg. the table on the right of https://en.wikipedia.org/wiki/12-hour_clock.