diff options
Diffstat (limited to 'absl/time/internal/cctz/src/time_zone_format_test.cc')
-rw-r--r-- | absl/time/internal/cctz/src/time_zone_format_test.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/absl/time/internal/cctz/src/time_zone_format_test.cc b/absl/time/internal/cctz/src/time_zone_format_test.cc index 6cea0360dd0e..3a5f19ac8b1f 100644 --- a/absl/time/internal/cctz/src/time_zone_format_test.cc +++ b/absl/time/internal/cctz/src/time_zone_format_test.cc @@ -463,8 +463,13 @@ TEST(Format, ExtendedSecondOffset) { EXPECT_TRUE(load_time_zone("Europe/Moscow", &tz)); tp = convert(civil_second(1919, 6, 30, 23, 59, 59), utc); - TestFormatSpecifier(tp, tz, "%E*z", "+04:31:19"); - TestFormatSpecifier(tp, tz, "%Ez", "+04:31"); + if (tz.lookup(tp).offset == 4 * 60 * 60) { + // We're likely dealing with zoneinfo that doesn't support really old + // timestamps, so Europe/Moscow never looks to be on local mean time. + } else { + TestFormatSpecifier(tp, tz, "%E*z", "+04:31:19"); + TestFormatSpecifier(tp, tz, "%Ez", "+04:31"); + } tp += seconds(1); TestFormatSpecifier(tp, tz, "%E*z", "+04:00:00"); } |