parseinlocation for non utc crud

Bel LaPointe 2022-01-06 21:28:44 -05:00
parent ccdd2615c4
commit dd7ac8d786
2 changed files with 2 additions and 2 deletions

View File

@ -97,5 +97,5 @@ type scheduleEZDate string
var scheduleEZDatePattern = regexp.MustCompile(`^[0-9]{4}-[0-9]{2}-[0-9]{2}$`)
func (ezdate scheduleEZDate) next(time.Time) (time.Time, error) {
return time.Parse("2006-01-02", string(ezdate))
return time.ParseInLocation("2006-01-02", string(ezdate), time.Local)
}

View File

@ -44,7 +44,7 @@ func (ts *TS) UnmarshalYAML(unmarshaller func(interface{}) error) error {
}
var s string
if err := unmarshaller(&s); err == nil {
t, err := time.Parse(time.UnixDate, s)
t, err := time.ParseInLocation(time.UnixDate, s, time.Local)
*ts = TS(t.Unix())
return err
}