1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2025-12-17 17:47:03 +00:00

UTC format timestamps in headers (#404) (#406)

This change makes all header timestamps (e.g. "Received") to use
UTC time zone.

This way the length of such headers do not depend on local time zone
which if effect fixes #404.

Signed-off-by: Saulius Gurklys <s4uliu5@gmail.com>
This commit is contained in:
Saulius Gurklys
2023-10-22 02:22:49 +03:00
committed by GitHub
parent 3d162549b1
commit b1acff08a3

View File

@@ -533,7 +533,7 @@ func (s *Session) dataHandler() {
mailData := bytes.NewBuffer(msgBuf)
// Mail data complete.
tstamp := time.Now().Format(timeStampFormat)
tstamp := time.Now().UTC().Format(timeStampFormat)
for _, recip := range s.recipients {
if recip.ShouldStore() {
// Generate Received header.