chore: always publish time in RFC 3339 (#5886)
This commit is contained in:
parent
f0f1f8c299
commit
72121dbcfe
4 changed files with 9 additions and 6 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue