def time_label_12(min_num):
hours, minutes = divmod(min_num, 60)
timestamp = time(hour=hours, minute=minutes)
return time.strftime(timestamp, '%I:%M %p')
# Given a minute number, return the 24-hour time label
文章目录