From f2d2dad3d85ef5111d1c9c922022b3dd311422e8 Mon Sep 17 00:00:00 2001 From: azivner Date: Sun, 15 Oct 2017 16:39:20 -0400 Subject: [PATCH] fix wrong dates - timestamps are number of seconds, not milliseconds --- node/routes/tree.js | 2 +- node/utils.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/node/routes/tree.js b/node/routes/tree.js index d9cb4ddae..dda03878d 100644 --- a/node/routes/tree.js +++ b/node/routes/tree.js @@ -29,7 +29,7 @@ router.get('/', auth.checkApiAuth, async (req, res, next) => { root_notes.push(note); } - notes_map[note['note_id']] = note + notes_map[note['note_id']] = note; } for (const note of notes) { diff --git a/node/utils.js b/node/utils.js index 5203f686f..7bd53a02e 100644 --- a/node/utils.js +++ b/node/utils.js @@ -19,7 +19,7 @@ function randomString(length, chars) { } function nowTimestamp() { - return Date.now(); + return Date.now() / 1000; } function toBase64(plainText) {