internal: use http.TimeFormat to marshal Time values

This commit is contained in:
Sebastien Binet
2021-03-16 18:42:55 +01:00
committed by GitHub
parent ed52608852
commit 8efde26ef9
2 changed files with 26 additions and 1 deletions

View File

@@ -321,7 +321,7 @@ func (t *Time) UnmarshalText(b []byte) error {
}
func (t *Time) MarshalText() ([]byte, error) {
s := time.Time(*t).Format(time.RFC1123Z)
s := time.Time(*t).UTC().Format(http.TimeFormat)
return []byte(s), nil
}