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
This commit is contained in:
Bryan Ashby 2020-11-24 19:42:02 -07:00
parent e140c98c35
commit a7e4f5baef
No known key found for this signature in database
GPG Key ID: B49EB437951D2542
1 changed files with 3 additions and 1 deletions

View File

@ -634,7 +634,9 @@ module.exports = class Message {
self.fromUserName = msgRow.from_user_name; self.fromUserName = msgRow.from_user_name;
self.subject = msgRow.subject; self.subject = msgRow.subject;
self.message = msgRow.message; 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); return callback(err);
} }