Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Second solution in Clear category for Time Converter (24h to 12h) by Vesagran
def time_converter(time):
hour = int(time[:2])
ap = " a.m." if hour < 12 else " p.m."
hour = (hour - 1) % 12 + 1
return str(hour) + (time[2:]) + ap
April 3, 2019