Skip to content

Commit 0de479d

Browse files
committed
Fix parsing 0 year.
Fix go-sql-driver#1252
1 parent a5bb807 commit 0de479d

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

utils.go

-4
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,6 @@ func parseDateTime(b []byte, loc *time.Location) (time.Time, error) {
118118
if err != nil {
119119
return time.Time{}, err
120120
}
121-
if year <= 0 {
122-
year = 1
123-
}
124-
125121
if b[4] != '-' {
126122
return time.Time{}, fmt.Errorf("bad value for field: `%c`", b[4])
127123
}

0 commit comments

Comments
 (0)