Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion libcxx/src/experimental/time_zone.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,7 @@ __first_rule(seconds __stdoff, const vector<__tz::__rule>& __rules) {
__continuation_end,
__continuation.__stdoff + __save,
chrono::duration_cast<minutes>(__save),
__continuation.__format},
chrono::__format(__continuation, __continuation.__format, __save)},
true};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@ static void test_abbrev(std::string_view input, std::string_view expected) {
TEST_LIBCPP_REQUIRE(result == expected, TEST_WRITE_CONCATENATED("\nExpected ", expected, "\nActual ", result, '\n'));
}

// This format is valid, however is not used in the tzdata.zi.
static void percentage_z_format() {
test_abbrev(
R"(
Expand Down Expand Up @@ -188,6 +187,12 @@ Z Format 0:45 F %z)",
R F 1999 max - Jan 5 0 -1 foo
Z Format 0:45 F %z)",
"-0015");

test_abbrev(
R"(
Z Format -1:2:20 - LMT 1912 Ja 1 1u
-1 - %z)",
"-01");
}

int main(int, const char**) {
Expand Down