forecasted times are now in 12 hr format when requested

Previously showed only 24 hr time, no matter what was requested. I edited it so that when hours = "12", the time format will be 12 hr time format.
This commit is contained in:
emilyboda
2020-06-04 15:39:47 -04:00
committed by GitHub
parent 13556a5cf3
commit 97d6046e30

View File

@@ -143,7 +143,7 @@ def to_hours(datetime_object, simple = False):
converted_time = datetime_object.format('HH:mm')
else:
if simple == True:
converted_time = datetime_object.format('H a')
converted_time = datetime_object.format('h a')
else:
converted_time = datetime_object.format('hh:mm')
return str(converted_time)