From 3c1f3d79ea8db9f20ef0854704e3eb131972a606 Mon Sep 17 00:00:00 2001 From: YairBorn <77966440+YairBorn@users.noreply.github.com> Date: Fri, 14 Apr 2023 06:41:34 +0300 Subject: [PATCH] Fix `ambiguous_local_time`'s message is slightly incorrect (#3650) --- stl/inc/chrono | 2 +- .../P0355R7_calendars_and_time_zones_formatting/test.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/stl/inc/chrono b/stl/inc/chrono index e0812f584..088cba4c2 100644 --- a/stl/inc/chrono +++ b/stl/inc/chrono @@ -6011,7 +6011,7 @@ namespace chrono { template _NODISCARD string ambiguous_local_time::_Make_string(const local_time<_Duration>& _Tp, const local_info& _Info) { ostringstream _Os; - _Os << _Tp << " is ambiguous. It could be\n" + _Os << _Tp << " is ambiguous. It could be\n" << _Tp << ' ' << _Info.first.abbrev << " == " << _Tp - _Info.first.offset << " UTC or\n" << _Tp << ' ' << _Info.second.abbrev << " == " << _Tp - _Info.second.offset << " UTC"; return _STD move(_Os).str(); diff --git a/tests/std/tests/P0355R7_calendars_and_time_zones_formatting/test.cpp b/tests/std/tests/P0355R7_calendars_and_time_zones_formatting/test.cpp index 1b4e719d1..f9de6a57e 100644 --- a/tests/std/tests/P0355R7_calendars_and_time_zones_formatting/test.cpp +++ b/tests/std/tests/P0355R7_calendars_and_time_zones_formatting/test.cpp @@ -798,11 +798,11 @@ void test_exception_classes() { } assert(s - == "2016-11-06 01:30:00 is ambiguous. It could be\n" + == "2016-11-06 01:30:00 is ambiguous. It could be\n" "2016-11-06 01:30:00 EDT == 2016-11-06 05:30:00 UTC or\n" "2016-11-06 01:30:00 EST == 2016-11-06 06:30:00 UTC" || s - == "2016-11-06 01:30:00 is ambiguous. It could be\n" + == "2016-11-06 01:30:00 is ambiguous. It could be\n" "2016-11-06 01:30:00 GMT-4 == 2016-11-06 05:30:00 UTC or\n" "2016-11-06 01:30:00 GMT-5 == 2016-11-06 06:30:00 UTC"); }