forked from commaai/openpilot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'commaai:master' into master
- Loading branch information
Showing
45 changed files
with
982 additions
and
381 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule cereal
updated
from 6bfd39 to b98714
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,15 @@ | ||
import datetime | ||
from pathlib import Path | ||
|
||
MIN_DATE = datetime.datetime(year=2024, month=1, day=28) | ||
_MIN_DATE = datetime.datetime(year=2024, month=3, day=30) | ||
|
||
def min_date(): | ||
# on systemd systems, the default time is the systemd build time | ||
systemd_path = Path("/lib/systemd/systemd") | ||
if systemd_path.exists(): | ||
d = datetime.datetime.fromtimestamp(systemd_path.stat().st_mtime) | ||
return d + datetime.timedelta(days=1) | ||
return _MIN_DATE | ||
|
||
def system_time_valid(): | ||
return datetime.datetime.now() > MIN_DATE | ||
return datetime.datetime.now() > min_date() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.