X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osm_common%2Ffsmongo.py;h=b0fe4a1ad5a69d66b1e40945db109bf8583724d9;hb=303ffe4f33c7a0fcc6b5c267d402c0e7d44e5a57;hp=2b67cf39511d2ca13175efc2a72f7e82186d2f7b;hpb=9703a089aad8eecc9b1f96733db342cf937ed964;p=osm%2Fcommon.git diff --git a/osm_common/fsmongo.py b/osm_common/fsmongo.py index 2b67cf3..b0fe4a1 100644 --- a/osm_common/fsmongo.py +++ b/osm_common/fsmongo.py @@ -602,7 +602,9 @@ class FsMongo(FsBase): # convert to relative path rel_filename = os.path.relpath(member["filename"], self.path) - last_modified_date = datetime.datetime.fromtimestamp( + # get timestamp in UTC because mongo stores upload date in UTC: + # https://www.mongodb.com/docs/v4.0/tutorial/model-time-data/#overview + last_modified_date = datetime.datetime.utcfromtimestamp( os.path.getmtime(member["filename"]) )