From c0be5c91f77661ae04f9e9a584d951476385adb8 Mon Sep 17 00:00:00 2001 From: Peter Zimon Date: Thu, 18 May 2023 13:44:37 +0200 Subject: [PATCH] Re-set auto time update in Admin X Settings refs. https://github.com/TryGhost/Team/issues/3150 --- .../src/components/settings/general/TimeZone.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ghost/admin-x-settings/src/components/settings/general/TimeZone.tsx b/ghost/admin-x-settings/src/components/settings/general/TimeZone.tsx index 3382003ac9..6e56b0c5e3 100644 --- a/ghost/admin-x-settings/src/components/settings/general/TimeZone.tsx +++ b/ghost/admin-x-settings/src/components/settings/general/TimeZone.tsx @@ -13,13 +13,13 @@ const TimeZone: React.FC = () => { const [currentTime, setCurrentTime] = useState(getLocalTime(publicationTimezone)); useEffect(() => { - setCurrentTime(getLocalTime(publicationTimezone)); - // const timer = setInterval(() => { - // }, 1000); + const timer = setInterval(() => { + setCurrentTime(getLocalTime(publicationTimezone)); + }, 1000); - // return () => { - // clearInterval(timer); - // }; + return () => { + clearInterval(timer); + }; }, [publicationTimezone]); const buttons = [