Skip to content

Build your personal knowledge base with Trilium Notes

fix wrong dates - timestamps are number of seconds, not milliseconds

azivnerf2d2dad3d85e
diff --git a/node/routes/tree.js b/node/routes/tree.js
index d9cb4ddae6..dda03878db 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 5203f686fa..7bd53a02e7 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) {