Store the dates as number and not strings to avoid ot issues

This commit is contained in:
yflory
2017-03-21 14:46:40 +01:00
parent 8556ce9d17
commit 6fbd1f0028
2 changed files with 4 additions and 4 deletions

View File

@@ -708,7 +708,7 @@ define([
else if (pHash.mode === parsedHash.mode && pHash.present) { shouldUpdate = true; } else if (pHash.mode === parsedHash.mode && pHash.present) { shouldUpdate = true; }
else { else {
// Editing a "weaker" version of a stored hash : update the date and do not push the current hash // 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; contains = true;
return pad; return pad;
} }
@@ -717,7 +717,7 @@ define([
if (shouldUpdate) { if (shouldUpdate) {
contains = true; contains = true;
// update the atime // update the atime
pad.atime = new Date().toISOString(); pad.atime = +new Date();
// set the name // set the name
pad.title = name; pad.title = name;

View File

@@ -748,8 +748,8 @@ define([
files[FILES_DATA].push({ files[FILES_DATA].push({
href: href, href: href,
title: title, title: title,
atime: new Date().toISOString(), atime: +new Date(),
ctime: new Date().toISOString() ctime: +new Date()
}); });
}; };
var createNewFile = exp.createNewFile = function (filePath, name, type, cb) { var createNewFile = exp.createNewFile = function (filePath, name, type, cb) {