Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
% 12 + 12 solution in Clear category for Time Converter (12h to 24h) by rafal.pawlowski
def time_converter(time):
hour,mode = time.split()
h,m = map(int,hour.split(':'))
h %= 12
if mode == 'p.m.':
h += 12
h = str(h).zfill(2)
m = str(m).zfill(2)
return f'{h}:{m}'
March 10, 2019