Fix bug 2231: reverse_sync in fsmongo obtains file timestamp with UTC timezone instead of local timezone, so
that filesystem and mongodb timestamps are correctly compared

Change-Id: I0056026704a624329aae1ae52a45143d12f6dfdd
Signed-off-by: Gabriel Cuba <gcuba@whitestack.com>
(cherry picked from commit 09496abf441b0f3730f0288df161da1ca004be69)
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 @@
 
             # 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"])
             )