Set times to utc when reading from database

This commit is contained in:
Tulir Asokan
2023-05-06 22:59:32 +03:00
parent 102b1510f8
commit 8100386f88
2 changed files with 2 additions and 2 deletions

View File

@@ -79,7 +79,7 @@ func (f *File) Scan(row dbutil.Scannable) *File {
} }
f.ID = fileID.String f.ID = fileID.String
f.EmojiName = emojiName.String f.EmojiName = emojiName.String
f.Timestamp = time.UnixMilli(timestamp) f.Timestamp = time.UnixMilli(timestamp).UTC()
f.Width = int(width.Int32) f.Width = int(width.Int32)
f.Height = int(height.Int32) f.Height = int(height.Int32)
f.MXC, err = id.ParseContentURI(mxc) f.MXC, err = id.ParseContentURI(mxc)

View File

@@ -29,7 +29,7 @@ func (up UserPortal) Scan(l log.Logger, row dbutil.Scannable) *UserPortal {
l.Errorln("Error scanning user portal:", err) l.Errorln("Error scanning user portal:", err)
panic(err) panic(err)
} }
up.Timestamp = time.UnixMilli(ts) up.Timestamp = time.UnixMilli(ts).UTC()
return &up return &up
} }