This caused that the timestamp in DNS was misinterpreted
as local time and often, databases could not be downloaded.
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
# Fetch the timestamp we need from DNS
t = location.discover_latest_version()
# Fetch the timestamp we need from DNS
t = location.discover_latest_version()
- # Parse timestamp into datetime format
- timestamp = datetime.datetime.utcfromtimestamp(t) if t else None
-
# Check the version of the local database
# Check the version of the local database
- if db and timestamp and db.created_at >= timestamp.timestamp():
+ if db and t and db.created_at >= t:
log.info("Already on the latest version")
return
log.info("Already on the latest version")
return