webmail: fix received date shown on message

we were trying to offset the timezone, but that makes no sense: we already
created a date in the local timezone based on (milli)seconds passed. so we can
just use that date instead of calculating a wrong date.
This commit is contained in:
Mechiel Lukkien
2023-11-04 23:35:44 +01:00
parent 2abac1a911
commit d02ac0cb86
4 changed files with 4 additions and 4 deletions

View File

@ -340,7 +340,7 @@ const equalAddress = (a: api.MessageAddress, b: api.MessageAddress) => {
const loadMsgheaderView = (msgheaderelem: HTMLElement, mi: api.MessageItem, moreHeaders: string[], refineKeyword: null | ((kw: string) => Promise<void>)) => {
const msgenv = mi.Envelope
const received = mi.Message.Received
const receivedlocal = new Date(received.getTime() - received.getTimezoneOffset()*60*1000)
const receivedlocal = new Date(received.getTime())
dom._kids(msgheaderelem,
// todo: make addresses clickable, start search (keep current mailbox if any)
dom.tr(