From 812341e09a5b4c930a15a767a6d7391be136367e Mon Sep 17 00:00:00 2001 From: Peter Sorger Date: Tue, 25 Apr 2023 17:53:43 +0200 Subject: [PATCH] Update __init__.py I experienced multiple times a glitch in ntp sync that resulted in setting the date to year 2080. This is a quick dirty fix to mitigate the issue and let the system run the sync again --- enviro/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/enviro/__init__.py b/enviro/__init__.py index 236f280..141b9c6 100644 --- a/enviro/__init__.py +++ b/enviro/__init__.py @@ -226,8 +226,8 @@ def low_disk_space(): # returns True if the rtc clock has been set recently def is_clock_set(): - # is the year on or before 2020? - if rtc.datetime()[0] <= 2020: + # is the year on or before 2020 or after 2050? + if rtc.datetime()[0] <= 2020 or rtc.datetime()[0] >= 2050: return False if helpers.file_exists("sync_time.txt"):