Skip to content

Commit 135648b

Browse files
committed
minor bug fix
update to add a 0 in front of single digit minute times
1 parent 3886113 commit 135648b

File tree

1 file changed

+1
-0
lines changed
  • Matrix_Portal_S3_ESPN_API/CircuitPython

1 file changed

+1
-0
lines changed

Matrix_Portal_S3_ESPN_API/CircuitPython/code.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ def convert_date_format(date, tz_information):
174174
# Convert 24-hour format to 12-hour format and determine AM/PM
175175
am_pm = "AM" if hour < 12 else "PM"
176176
hour_12 = hour if hour <= 12 else hour - 12
177+
minute = minute if minute >= 10 else f"0{minute}"
177178
# Determine the timezone abbreviation based on the offset
178179
time_zone_str = tz_information[1]
179180
return f"{month}/{day} - {hour_12}:{minute} {am_pm} {time_zone_str}"

0 commit comments

Comments
 (0)