parseinlocation for non utc crud
parent
ccdd2615c4
commit
dd7ac8d786
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue