Skip to content

Commit

Permalink
zero padding
Browse files Browse the repository at this point in the history
  • Loading branch information
BlitzCityDIY committed Sep 15, 2023
1 parent 135648b commit ca24d8b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Matrix_Portal_S3_ESPN_API/CircuitPython/code.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ def convert_date_format(date, tz_information):
# Convert 24-hour format to 12-hour format and determine AM/PM
am_pm = "AM" if hour < 12 else "PM"
hour_12 = hour if hour <= 12 else hour - 12
minute = minute if minute >= 10 else f"0{minute}"
minute = f"{minute:02}"
# Determine the timezone abbreviation based on the offset
time_zone_str = tz_information[1]
return f"{month}/{day} - {hour_12}:{minute} {am_pm} {time_zone_str}"
Expand Down

0 comments on commit ca24d8b

Please sign in to comment.