lab.nexedi.com will be down from Thursday, 20 March 2025, 07:30:00 UTC for a duration of approximately 2 hours

Commit 5e63ddd3 authored by Stefan Schantl's avatar Stefan Schantl

location(8): Fix pasing timestamp for systems not running on UTC

Signed-off-by: default avatarStefan Schantl <stefan.schantl@ipfire.org>
parent 2201d904
......@@ -401,7 +401,7 @@ class CLI(object):
now = datetime.datetime.utcnow()
# Parse the database timestamp
t = datetime.datetime.fromtimestamp(db.created_at)
t = datetime.datetime.utcfromtimestamp(db.created_at)
if ns.cron == "daily":
delta = datetime.timedelta(days=1)
......@@ -422,7 +422,7 @@ class CLI(object):
t = location.discover_latest_version()
# Parse timestamp into datetime format
timestamp = datetime.datetime.fromtimestamp(t) if t else None
timestamp = datetime.datetime.utcfromtimestamp(t) if t else None
# Check the version of the local database
if db and timestamp and db.created_at >= timestamp.timestamp():
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment