fix String2Time

This commit is contained in:
CyJaySong 2023-07-14 18:30:23 +08:00
parent 50ef83d456
commit eb076f4b94
1 changed files with 0 additions and 7 deletions

View File

@ -69,13 +69,6 @@ func String2Time(s string, originalLocation *time.Location, convertedLocation *t
}
dt = dt.In(convertedLocation)
return &dt, nil
} else if len(s) == 21 && s[10] == 'T' {
dt, err := time.ParseInLocation("2006-01-02T15:04:05", s[:19], originalLocation)
if err != nil {
return nil, err
}
dt = dt.In(convertedLocation)
return &dt, nil
} else if len(s) == 10 && s[4] == '-' {
if s == "0000-00-00" || s == "0001-01-01" {
return &time.Time{}, nil