From a7e4f5baef8d89d84119a0e2899a06a68e207859 Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Tue, 24 Nov 2020 19:42:02 -0700 Subject: [PATCH] Use moment.parseZone() * Currently messages are stored with TZ offsets * Imported messages with e.g. TZUTC kludges are adjusted * Due to the above, use parseZone() to preserve when loading a message timestamp --- core/message.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/message.js b/core/message.js index 73ebe761..c5ad490b 100644 --- a/core/message.js +++ b/core/message.js @@ -634,7 +634,9 @@ module.exports = class Message { self.fromUserName = msgRow.from_user_name; self.subject = msgRow.subject; self.message = msgRow.message; - self.modTimestamp = moment(msgRow.modified_timestamp); + + // We use parseZone() to *preserve* the time zone information + self.modTimestamp = moment.parseZone(msgRow.modified_timestamp); return callback(err); }