diff --git a/preload/main.py b/preload/main.py
index 6fc7b6f2d0cb12f9b78ef4629d35e591f0231c1a..eb04e2630ac8bfd4bd0a5f7aeecca5da7d3085d0 100644
--- a/preload/main.py
+++ b/preload/main.py
@@ -174,6 +174,8 @@ class Clock:
                     elif button_pressed and v & buttons.BOTTOM_RIGHT != 0:
                         self.setTheme(self.theme + 1)
                         self.writeConfig()
+                    elif button_pressed and v & buttons.TOP_RIGHT != 0:
+                        self.setTime(disp, localtime)
 
         except KeyboardInterrupt:
             for i in range(11):
@@ -245,6 +247,44 @@ class Clock:
 
         disp.update()
 
+    def setTime(self, disp, localtime):
+        accepted = False
+        blank = False
+        previously_pressed_button = buttons.TOP_RIGHT
+        button_repeat_counter = 0
+        set_seconds = utime.mktime(localtime)
+
+        while not accepted:
+            v = buttons.read(buttons.BOTTOM_LEFT | buttons.BOTTOM_RIGHT | buttons.TOP_RIGHT)
+            button_pressed = v != 0
+
+            if button_pressed:
+                if v & previously_pressed_button != 0:
+                    button_repeat_counter += 1
+                else:
+                    if v & buttons.BOTTOM_LEFT != 0:
+                        previously_pressed_button = buttons.BOTTOM_LEFT
+                    elif v & buttons.BOTTOM_RIGHT != 0:
+                        previously_pressed_button = buttons.BOTTOM_RIGHT
+                    elif v & buttons.TOP_RIGHT != 0 and previously_pressed_button != buttons.TOP_RIGHT:
+                        accepted = True
+                    else:
+                        previously_pressed_button = 0
+            else:
+                previously_pressed_button = 0
+                button_repeat_counter = 0
+
+            seconds_change = int(min(1.1**button_repeat_counter, 60*23))
+            if previously_pressed_button == buttons.BOTTOM_LEFT:
+                set_seconds -= seconds_change
+            elif previously_pressed_button == buttons.BOTTOM_RIGHT:
+                set_seconds += seconds_change
+
+            self.updateClock(disp, utime.localtime(set_seconds))
+            utime.sleep_ms(23)
+
+        utime.set_time(int(set_seconds))
+
     def circlePoint(self, t):
         return (
             int(round(self.radius * math.cos(t))) + self.center[0],