MLB-LED-Scoreboard / mlb-led-scoreboard

An LED scoreboard for Major League Baseball :baseball:
GNU General Public License v3.0
591 stars 105 forks source link

Upcoming games don't have AM/PM in the time #357

Closed twfarley closed 2 years ago

twfarley commented 2 years ago

Probably a regression from something I changed in the off day renderer for #353.

ty-porter commented 2 years ago

Doesn't look like it's new based on strftime() implementation: https://docs.python.org/3/library/datetime.html#strftime-and-strptime-format-codes

Maybe change format to "%-I %p"?

twfarley commented 2 years ago

Yeah, the off day renderer has some logic to append the AM or PM.

time_format_str = "{}:%M".format(time_format)
    if time_format == "%-I":
        time_format_str += "%p"

I'll add this in and test it later tonight.