cRonstrue
cRonstrue copied to clipboard
Incorrect leading zero in 12-hour time
Thanks for all the great work on cRonstrue!
I noticed that when a time in 24-hour format is converted to 12-hour format, it still has a leading zero: 16:51
or 51 16 * * *
becomes 04:51 PM
. The leading zero for hours is used in 24-hour time (e.g., 04:51
for 4:51 AM
) but not in 12-hour time. I would expect 16:51
to be translated as 4:51 PM
.
Hi @jweill-aws - I've seen requests for both formats and I think ISO 8601 (at least) calls for leading zeros. Regardless, adding an option for this could be useful.
Related: https://github.com/bradymholt/cRonstrue/issues/217