Skip to content

Commit

Permalink
zero handling
Browse files Browse the repository at this point in the history
  • Loading branch information
rhino1998 committed Sep 23, 2024
1 parent 852db5a commit 70a90a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion configtype/time.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func (t *Time) UnmarshalJSON(b []byte) error {
switch {
case timeRFC3339Regexp.MatchString(s):
t.time, err = time.Parse(time.RFC3339, s)
if t.time == (time.Time{}) {
if t.time.IsZero() {
t.typ = timeTypeZero
} else {
t.typ = timeTypeFixed
Expand Down

0 comments on commit 70a90a4

Please sign in to comment.