converts a time with an AM/PM designation to 24-hour time