From 1a7e295408f05d5d84cc0423a616fa76bb3e2670 Mon Sep 17 00:00:00 2001 From: lady ada Date: Sat, 14 Nov 2020 21:02:27 -0500 Subject: [PATCH] woops missed leading zero on mins --- MagTag_SimpleClock/code.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MagTag_SimpleClock/code.py b/MagTag_SimpleClock/code.py index 87e7462b4..33c2e8e12 100644 --- a/MagTag_SimpleClock/code.py +++ b/MagTag_SimpleClock/code.py @@ -29,13 +29,13 @@ while True: hour = now[3] minute = now[4] if HOUR_MODE_24: - timestr = "%d:%2d" % (hour, minute) + timestr = "%d:%02d" % (hour, minute) else: is_pm = (hour >= 12) hour %= 12 if hour == 0: hour = 12 - timestr = "%d:%2d" % (hour, minute) + timestr = "%d:%02d" % (hour, minute) if timestr != last_timestr: magtag.set_text(timestr) last_timestr = timestr