aboutsummaryrefslogtreecommitdiff
path: root/src/time/zoneinfo_read.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/time/zoneinfo_read.go')
-rw-r--r--src/time/zoneinfo_read.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/time/zoneinfo_read.go b/src/time/zoneinfo_read.go
index 38c40b53d4..b79bd474c7 100644
--- a/src/time/zoneinfo_read.go
+++ b/src/time/zoneinfo_read.go
@@ -313,8 +313,16 @@ func LoadLocationFromTZData(name string, data []byte) (*Location, error) {
l.cacheEnd = omega
if i+1 < len(tx) {
l.cacheEnd = tx[i+1].when
+ } else if l.extend != "" {
+ // If we're at the end of the known zone transitions,
+ // try the extend string.
+ if _, _, estart, eend, ok := tzset(l.extend, l.cacheEnd, sec); ok {
+ l.cacheStart = estart
+ l.cacheEnd = eend
+ }
}
l.cacheZone = &l.zone[tx[i].index]
+ break
}
}