Remove sign from prettytime(), as it fucks with the alignment with the new font

This commit is contained in:
David Thurstenson 2023-08-10 08:24:08 -05:00
parent 30eb0372e0
commit 6800d0eb7a
1 changed files with 1 additions and 10 deletions

View File

@ -103,16 +103,7 @@ pixels.show()
# Use datetime.timedelta to convert an int of seconds to a # Use datetime.timedelta to convert an int of seconds to a
# string with the format MM:SS # string with the format MM:SS
def prettytime(seconds): def prettytime(seconds):
# Add a negative sign to the output when current_time is negative. return str(datetime.timedelta(seconds=abs(seconds)))[2:]
# prettytime() puts the given value through abs() because the way
# datetime.timedelta() represents negative values is kind of a PITA
# to deal with.
if seconds < 0:
display_time_sign = "-"
else:
display_time_sign = ""
return display_time_sign + str(datetime.timedelta(seconds=abs(seconds)))[2:]
# Set the color on a single neopixel based on colormode and # Set the color on a single neopixel based on colormode and