projects
/
osm
/
common.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix bug 2231: reverse_sync in fsmongo obtains file timestamp with UTC timezone instea...
[osm/common.git]
/
osm_common
/
fsmongo.py
diff --git
a/osm_common/fsmongo.py
b/osm_common/fsmongo.py
index
f99267f
..
4f4e5eb
100644
(file)
--- 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)
# 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"])
)
os.path.getmtime(member["filename"])
)