diff options
author | Ian Lance Taylor <iant@golang.org> | 2021-03-12 19:44:12 -0800 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2021-03-15 14:52:55 -0700 |
commit | 3a5bcac339c5b166bc1a51c38226a8dc5e6484ca (patch) | |
tree | 0049b97ee92ee092025a5691336112654a21be94 /libgo/go/time/zoneinfo.go | |
parent | 7b843d4716698957606c05219a66d3fc4b44ba83 (diff) | |
download | gcc-3a5bcac339c5b166bc1a51c38226a8dc5e6484ca.zip gcc-3a5bcac339c5b166bc1a51c38226a8dc5e6484ca.tar.gz gcc-3a5bcac339c5b166bc1a51c38226a8dc5e6484ca.tar.bz2 |
libgo: update to Go 1.16.2 release
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/301459
Diffstat (limited to 'libgo/go/time/zoneinfo.go')
-rw-r--r-- | libgo/go/time/zoneinfo.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libgo/go/time/zoneinfo.go b/libgo/go/time/zoneinfo.go index c366229..6db9443 100644 --- a/libgo/go/time/zoneinfo.go +++ b/libgo/go/time/zoneinfo.go @@ -377,8 +377,10 @@ func tzsetOffset(s string) (offset int, rest string, ok bool) { neg = true } + // The tzdata code permits values up to 24 * 7 here, + // although POSIX does not. var hours int - hours, s, ok = tzsetNum(s, 0, 24) + hours, s, ok = tzsetNum(s, 0, 24*7) if !ok { return 0, "", false } @@ -487,7 +489,7 @@ func tzsetRule(s string) (rule, string, bool) { } offset, s, ok := tzsetOffset(s[1:]) - if !ok || offset < 0 { + if !ok { return rule{}, "", false } r.time = offset |