Fix convert_time() to handle 12 am/pm right.

The code was treating variations of 12 AM as 12:00, and was trying to
convert 12 PM to 24:00 (which caused an exception).  Changing hour 12 to
0 before adding the PM offset makes 12 AM -> 00:00 and 12 PM -> 12:00.