chore: always publish time in RFC 3339 (#5886)

This commit is contained in:
andig 2023-01-24 18:43:38 +01:00 • committed by GitHub
parent f0f1f8c299
commit 72121dbcfe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 6 deletions

View file

@ -94,7 +94,7 @@ func encode(v interface{}) (string, error) {
case time.Time:
var b []byte
if !val.IsZero() {
b, _ = val.MarshalText()
b, _ = val.Round(time.Second).Local().MarshalText()
}
s = fmt.Sprintf(`"%s"`, string(b))
case time.Duration: