From 6fbd1f00289cd195c7255984048f2f369d888deb Mon Sep 17 00:00:00 2001 From: yflory Date: Tue, 21 Mar 2017 14:46:40 +0100 Subject: [PATCH] Store the dates as number and not strings to avoid ot issues --- www/common/cryptpad-common.js | 4 ++-- www/common/fileObject.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js index d5903732e..7862adb31 100644 --- a/www/common/cryptpad-common.js +++ b/www/common/cryptpad-common.js @@ -708,7 +708,7 @@ define([ else if (pHash.mode === parsedHash.mode && pHash.present) { shouldUpdate = true; } else { // Editing a "weaker" version of a stored hash : update the date and do not push the current hash - pad.atime = new Date().toISOString(); + pad.atime = +new Date(); contains = true; return pad; } @@ -717,7 +717,7 @@ define([ if (shouldUpdate) { contains = true; // update the atime - pad.atime = new Date().toISOString(); + pad.atime = +new Date(); // set the name pad.title = name; diff --git a/www/common/fileObject.js b/www/common/fileObject.js index 85f278827..7fbdf045b 100644 --- a/www/common/fileObject.js +++ b/www/common/fileObject.js @@ -748,8 +748,8 @@ define([ files[FILES_DATA].push({ href: href, title: title, - atime: new Date().toISOString(), - ctime: new Date().toISOString() + atime: +new Date(), + ctime: +new Date() }); }; var createNewFile = exp.createNewFile = function (filePath, name, type, cb) {