diff --git a/micropython/examples/cosmic_unicorn/clock.py b/micropython/examples/cosmic_unicorn/clock.py index 2c51ed09..0ccfc1f5 100644 --- a/micropython/examples/cosmic_unicorn/clock.py +++ b/micropython/examples/cosmic_unicorn/clock.py @@ -180,7 +180,7 @@ def redraw_display_if_reqd(): year, month, day, wd, hour, minute, second, _ = rtc.datetime() if second != last_second: - hour += utc_offset + hour = (hour + utc_offset) % 24 time_through_day = (((hour * 60) + minute) * 60) + second percent_through_day = time_through_day / 86400 percent_to_midday = 1.0 - ((math.cos(percent_through_day * math.pi * 2) + 1) / 2) diff --git a/micropython/examples/galactic_unicorn/clock.py b/micropython/examples/galactic_unicorn/clock.py index b34f6da3..8e23be52 100644 --- a/micropython/examples/galactic_unicorn/clock.py +++ b/micropython/examples/galactic_unicorn/clock.py @@ -180,7 +180,7 @@ def redraw_display_if_reqd(): year, month, day, wd, hour, minute, second, _ = rtc.datetime() if second != last_second: - hour += utc_offset + hour = (hour + utc_offset) % 24 time_through_day = (((hour * 60) + minute) * 60) + second percent_through_day = time_through_day / 86400 percent_to_midday = 1.0 - ((math.cos(percent_through_day * math.pi * 2) + 1) / 2) diff --git a/micropython/examples/interstate75/75W/clock.py b/micropython/examples/interstate75/75W/clock.py index c95ca905..d3b5fd47 100644 --- a/micropython/examples/interstate75/75W/clock.py +++ b/micropython/examples/interstate75/75W/clock.py @@ -156,7 +156,7 @@ def redraw_display_if_reqd(): year, month, day, wd, hour, minute, second, _ = rtc.datetime() if second != last_second: - hour += utc_offset + hour = (hour + utc_offset) % 24 time_through_day = (((hour * 60) + minute) * 60) + second percent_through_day = time_through_day / 86400 percent_to_midday = 1.0 - ((math.cos(percent_through_day * math.pi * 2) + 1) / 2)