the bug is with UTC, does this fix it?

This commit is contained in:
David Dworken 2022-04-11 23:02:46 -07:00
parent d39ca42cea
commit 7d2eb878ac

View File

@ -143,6 +143,14 @@ func parseTimeGenerously(input string) (time.Time, error) {
if err == nil { if err == nil {
return t.Add(time.Hour), nil return t.Add(time.Hour), nil
} }
t, err = time.Parse("2006-01-02T15:04:05 1700", inputWithTimeZone)
if err == nil {
return t.Add(time.Hour), nil
}
t, err = time.Parse("2006-01-02T15:04 1700", inputWithTimeZone)
if err == nil {
return t.Add(time.Hour), nil
}
t, err = time.Parse("2006-01-02", input) t, err = time.Parse("2006-01-02", input)
if err == nil { if err == nil {
return t.Local(), nil return t.Local(), nil