mirror of
https://github.com/golang/go
synced 2024-11-07 16:26:11 -07:00
parent
ddb423a7da
commit
54b2015005
@ -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,
|
// If we're at the end of the known zone transitions,
|
||||||
// try the extend string.
|
// try the extend string.
|
||||||
if lo == len(tx)-1 && l.extend != "" {
|
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
|
return ename, eoffset, estart, eend, eisDST
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -329,7 +329,7 @@ func LoadLocationFromTZData(name string, data []byte) (*Location, error) {
|
|||||||
} else if l.extend != "" {
|
} else if l.extend != "" {
|
||||||
// If we're at the end of the known zone transitions,
|
// If we're at the end of the known zone transitions,
|
||||||
// try the extend string.
|
// 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.cacheStart = estart
|
||||||
l.cacheEnd = eend
|
l.cacheEnd = eend
|
||||||
// Find the zone that is returned by tzset to avoid allocation if possible.
|
// Find the zone that is returned by tzset to avoid allocation if possible.
|
||||||
|
Loading…
Reference in New Issue
Block a user