Set times to utc when reading from database
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
@@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user