From 0fe935a5de9a3dcdc21010f4fa30f4854f2eae10 Mon Sep 17 00:00:00 2001
From: Narr the Reg <juangerman-13@hotmail.com>
Date: Tue, 3 Oct 2023 20:09:10 -0600
Subject: [PATCH] core: Update clocks when settings are saved

---
 src/core/core.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/core/core.cpp b/src/core/core.cpp
index 08cbb89783..0ab2e3b761 100644
--- a/src/core/core.cpp
+++ b/src/core/core.cpp
@@ -1078,6 +1078,10 @@ void System::ApplySettings() {
     impl->RefreshTime();
 
     if (IsPoweredOn()) {
+        if (Settings::values.custom_rtc_enabled) {
+            const s64 posix_time{Settings::values.custom_rtc.GetValue()};
+            GetTimeManager().UpdateLocalSystemClockTime(posix_time);
+        }
         Renderer().RefreshBaseSettings();
     }
 }