Skip to content

Commit

Permalink
fix(types/time): deal negative number in second unit
Browse files Browse the repository at this point in the history
  • Loading branch information
yangwenmai authored and SunRunAway committed Aug 5, 2019
1 parent 5ecbc61 commit 611239d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions types/time.go
Original file line number Diff line number Diff line change
Expand Up @@ -1643,6 +1643,7 @@ func parseSingleTimeValue(unit string, format string, strictCheck bool) (int64,
if unit != "SECOND" {
err = ErrTruncatedWrongValue.GenWithStackByArgs(format)
}
dv *= sign
}
switch strings.ToUpper(unit) {
case "MICROSECOND":
Expand Down

0 comments on commit 611239d

Please sign in to comment.