summaryrefslogtreecommitdiff
path: root/absl
diff options
context:
space:
mode:
Diffstat (limited to 'absl')
-rw-r--r--absl/time/internal/cctz/src/time_zone_info.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/absl/time/internal/cctz/src/time_zone_info.cc b/absl/time/internal/cctz/src/time_zone_info.cc
index a2617d5e..8966f7ac 100644
--- a/absl/time/internal/cctz/src/time_zone_info.cc
+++ b/absl/time/internal/cctz/src/time_zone_info.cc
@@ -349,7 +349,6 @@ bool TimeZoneInfo::ExtendTransitions() {
PosixTimeZone posix;
if (!ParsePosixSpec(future_spec_, &posix)) return false;
- if (AllYearDST(posix)) return true; // last transition still prevails
// Find transition type for the future std specification.
std::uint_least8_t std_ti;
@@ -367,6 +366,12 @@ bool TimeZoneInfo::ExtendTransitions() {
if (!GetTransitionType(posix.dst_offset, true, posix.dst_abbr, &dst_ti))
return false;
+ if (AllYearDST(posix)) { // dst only
+ // The future specification should match the last transition, and
+ // that means that handling the future will fall out naturally.
+ return EquivTransitions(transitions_.back().type_index, dst_ti);
+ }
+
// Extend the transitions for an additional 400 years using the
// future specification. Years beyond those can be handled by
// mapping back to a cycle-equivalent year within that range.