Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not accept wrong dates (e.g. 2080) #174

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions enviro/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"):
Expand Down