diff --git a/services/notes.js b/services/notes.js index 6bd94bbe6..f02fee4d8 100644 --- a/services/notes.js +++ b/services/notes.js @@ -142,6 +142,7 @@ async function updateNote(noteId, newNote, ctx) { } const now = new Date(); + const nowStr = utils.nowDate(); const historySnapshotTimeInterval = parseInt(await options.getOption('history_snapshot_time_interval')); @@ -170,7 +171,7 @@ async function updateNote(noteId, newNote, ctx) { note_text: oldNote.note_text, is_protected: 0, // will be fixed in the protectNoteHistory() call date_modified_from: oldNote.date_modified, - date_modified_to: now + date_modified_to: nowStr }); await sync_table.addNoteHistorySync(newNoteHistoryId); @@ -182,7 +183,7 @@ async function updateNote(noteId, newNote, ctx) { newNote.detail.note_title, newNote.detail.note_text, newNote.detail.is_protected, - now, + nowStr, noteId]); await sync_table.addNoteSync(noteId); diff --git a/services/utils.js b/services/utils.js index 09f5190d2..6f06a52a9 100644 --- a/services/utils.js +++ b/services/utils.js @@ -62,10 +62,6 @@ function isElectron() { return !!process.versions['electron']; } -function formatTwoDates(origDate, newDate) { - return "orig: " + origDate + ", new: " + newDate; -} - function hash(text) { return crypto.createHash('sha1').update(text).digest('base64'); } @@ -88,7 +84,6 @@ module.exports = { fromBase64, hmac, isElectron, - formatTwoDates, hash, isEmptyOrWhitespace }; \ No newline at end of file