X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osm_common%2Ffsmongo.py;h=4f4e5ebee9ef5d77e935922f53c163c7929690c7;hb=b2d732a70efa33e4bc478d351d64bc4adb4ea332;hp=f99267fc86bffffa7b6bc44bd8f5430b7614c477;hpb=76394efe9fbee088dddd1dc9d4da6f043c3959a5;p=osm%2Fcommon.git diff --git a/osm_common/fsmongo.py b/osm_common/fsmongo.py index f99267f..4f4e5eb 100644 --- a/osm_common/fsmongo.py +++ b/osm_common/fsmongo.py @@ -601,7 +601,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"]) )