Skip to content

Commit 3c1f3d7

Browse files
authored
Fix ambiguous_local_time's message is slightly incorrect (#3650)
1 parent 5f1a105 commit 3c1f3d7

File tree

2 files changed

+3
-3
lines changed
  • stl/inc
  • tests/std/tests/P0355R7_calendars_and_time_zones_formatting

2 files changed

+3
-3
lines changed

stl/inc/chrono

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6011,7 +6011,7 @@ namespace chrono {
60116011
template <class _Duration>
60126012
_NODISCARD string ambiguous_local_time::_Make_string(const local_time<_Duration>& _Tp, const local_info& _Info) {
60136013
ostringstream _Os;
6014-
_Os << _Tp << " is ambiguous. It could be\n"
6014+
_Os << _Tp << " is ambiguous. It could be\n"
60156015
<< _Tp << ' ' << _Info.first.abbrev << " == " << _Tp - _Info.first.offset << " UTC or\n"
60166016
<< _Tp << ' ' << _Info.second.abbrev << " == " << _Tp - _Info.second.offset << " UTC";
60176017
return _STD move(_Os).str();

tests/std/tests/P0355R7_calendars_and_time_zones_formatting/test.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -798,11 +798,11 @@ void test_exception_classes() {
798798
}
799799

800800
assert(s
801-
== "2016-11-06 01:30:00 is ambiguous. It could be\n"
801+
== "2016-11-06 01:30:00 is ambiguous. It could be\n"
802802
"2016-11-06 01:30:00 EDT == 2016-11-06 05:30:00 UTC or\n"
803803
"2016-11-06 01:30:00 EST == 2016-11-06 06:30:00 UTC"
804804
|| s
805-
== "2016-11-06 01:30:00 is ambiguous. It could be\n"
805+
== "2016-11-06 01:30:00 is ambiguous. It could be\n"
806806
"2016-11-06 01:30:00 GMT-4 == 2016-11-06 05:30:00 UTC or\n"
807807
"2016-11-06 01:30:00 GMT-5 == 2016-11-06 06:30:00 UTC");
808808
}

0 commit comments

Comments
 (0)