diff --git a/src/time/zoneinfo.go b/src/time/zoneinfo.go index dd3b4edd01..d83e4d37d1 100644 --- a/src/time/zoneinfo.go +++ b/src/time/zoneinfo.go @@ -203,7 +203,7 @@ func (l *Location) lookup(sec int64) (name string, offset int, start, end int64, // If we're at the end of the known zone transitions, // try the extend string. if lo == len(tx)-1 && l.extend != "" { - if ename, eoffset, estart, eend, eisDST, ok := tzset(l.extend, end, sec); ok { + if ename, eoffset, estart, eend, eisDST, ok := tzset(l.extend, start, sec); ok { return ename, eoffset, estart, eend, eisDST } } diff --git a/src/time/zoneinfo_read.go b/src/time/zoneinfo_read.go index d8b35003a1..4d0e47d890 100644 --- a/src/time/zoneinfo_read.go +++ b/src/time/zoneinfo_read.go @@ -329,7 +329,7 @@ func LoadLocationFromTZData(name string, data []byte) (*Location, error) { } else if l.extend != "" { // If we're at the end of the known zone transitions, // try the extend string. - if name, offset, estart, eend, isDST, ok := tzset(l.extend, l.cacheEnd, sec); ok { + if name, offset, estart, eend, isDST, ok := tzset(l.extend, l.cacheStart, sec); ok { l.cacheStart = estart l.cacheEnd = eend // Find the zone that is returned by tzset to avoid allocation if possible.