From 0c74f6b1a3bdce5ebdc2ee452b9baf3e421dd3d1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Peter=20M=C3=BCller?= Date: Thu, 29 Oct 2020 07:25:53 -0700 Subject: [PATCH] location update: Remove double conversion of timestamps MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- src/python/location.in | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/python/location.in b/src/python/location.in index b5e5758..070640c 100644 --- a/src/python/location.in +++ b/src/python/location.in @@ -421,11 +421,8 @@ class CLI(object): # 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 - 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 -- 2.39.2