diff --git a/chrome/content/zotero/xpcom/storage/webdav.js b/chrome/content/zotero/xpcom/storage/webdav.js index 7a64e149e4..676dd12994 100644 --- a/chrome/content/zotero/xpcom/storage/webdav.js +++ b/chrome/content/zotero/xpcom/storage/webdav.js @@ -423,8 +423,16 @@ Zotero.Sync.Storage.Session.WebDAV.prototype._processUploadFile = function (data // Local file time var fmtime = item.attachmentModificationTime; - if (fmtime == mtime) { - Zotero.debug("File mod time matches remote file -- skipping upload"); + // Allow timestamp to be exactly one hour off to get around + // time zone issues -- there may be a proper way to fix this + if (fmtime == mtime || Math.abs(fmtime - mtime) == 3600) { + if (fmtime == mtime) { + Zotero.debug("File mod time matches remote file -- skipping upload"); + } + else { + Zotero.debug("File mod time (" + fmtime + ") is exactly one hour off remote file (" + mtime + ") " + + "-- assuming time zone issue and skipping upload"); + } Zotero.DB.beginTransaction(); var syncState = Zotero.Sync.Storage.getSyncState(item.id); diff --git a/chrome/content/zotero/xpcom/storage/zfs.js b/chrome/content/zotero/xpcom/storage/zfs.js index 6ae71a5bbd..e552d36e67 100644 --- a/chrome/content/zotero/xpcom/storage/zfs.js +++ b/chrome/content/zotero/xpcom/storage/zfs.js @@ -315,8 +315,16 @@ Zotero.Sync.Storage.Session.ZFS.prototype._processUploadFile = function (data) { // Local file time var fmtime = item.attachmentModificationTime; - if (fmtime == mtime) { - Zotero.debug("File mod time matches remote file -- skipping upload"); + // Allow timestamp to be exactly one hour off to get around + // time zone issues -- there may be a proper way to fix this + if (fmtime == mtime || Math.abs(fmtime - mtime) == 3600) { + if (fmtime == mtime) { + Zotero.debug("File mod time matches remote file -- skipping upload"); + } + else { + Zotero.debug("File mod time (" + fmtime + ") is exactly one hour off remote file (" + mtime + ") " + + "-- assuming time zone issue and skipping upload"); + } Zotero.debug(Zotero.Sync.Storage.getSyncedModificationTime(item.id));