SQLite Forum

How to convert am/pm time to 24hrs time format
Login
> "11:59:59 am {tick} 12:00:00 am {tick} 12:00:01 pm" hurts my OCD.

Same here. To put it in other words, the visual change from 11:59:59 to 12:00:00 is so much greater than the change from 12:00:00 to 12:00:01 (visually and using the Hamming distance), it is only reasonable that the am/pm change should happen at the same time.

> Until 2019 ISO 8601 allowed using 24:00:00 to refer to the end of the day but now that is forbidden.

I wasn't aware of that change. It makes sense, though, at least when you wish for machine readable time strings. I might still want to use it for human consumption, though.

I have also noticed that in the US, any insurance contract will start at 12:01 am, in order to avoid ambiguity. It would not help to say 12:00 midnight, since the question is still open whether that is the midnight before or after the stated date. But a slightly disconcerting side effect is that, if you switch insurance providers, your house will be uninsured for one minute after midnight. Better hope it is not struck by lightning at that moment.