The standard input rules for time values are very simple. The input can be of the form: nn[-nn[-nn]][cycle]. The minus sign (-) can be any special character or nothing at all. The first set of numbers are taken as the hours. The second set are minutes. The last set are seconds. The second and third sets are not required. If the character after the last set of numbers is a letter, it is taken as a time cycle specification (AM/PM, etc.) and compared against the possible cycle names (case insensitive).
After the input string has been scanned, the numbers are converted to binary and adjusted for the indicated time cycle (if any). Valid range of hours is 1 to 24, for minutes the range is 0 to 59, seconds have a range of 0 to 59.