Tester and Editorialist:
12 hr to 24 hr clock time conversion
Given a time in 12hr format print the same time in 24hr format.
For a given time in 12hr format we check if it is in AM or PM.
If it is in PM and the hour is less and 12 then we add 12 to it, but if the hour is equal to 12 then we keep it as it is.
If it is in AM and the hour is equal to 12 then we make the hour as 0 and do nothing otherwise.
Can be found here