Skip to content

Commit

Permalink
Fixed 12hour calculation in date time printer
Browse files Browse the repository at this point in the history
  • Loading branch information
darrenldl committed Apr 12, 2024
1 parent c66de19 commit b66d506
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion timedesc/printers.ml
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,10 @@ module Format_string_parsers = struct
*> commit
*> padding
>>= fun padding ->
let hour = if hour = 0 then 12 else hour mod 12 in
let hour =
if hour = 0 then 12
else if hour > 12 then hour - 12 else hour
in
return (pad_int padding hour));
(string "min:"
*> commit
Expand Down

0 comments on commit b66d506

Please sign in to comment.