From ea8a24504d3d83881dcbd5a5162969a1006a5b53 Mon Sep 17 00:00:00 2001 From: Howard Hinnant Date: Thu, 13 Apr 2017 14:17:04 -0400 Subject: [PATCH] Do not change time_point of an invalid date is parsed. --- date.html | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/date.html b/date.html index 8fdb864..917ec22 100644 --- a/date.html +++ b/date.html @@ -1808,7 +1808,9 @@ If %z is present, the parsed offset will be subtracted from the par If abbrev is not equal to nullptr, the information parsed by %Z (if present) will be placed in *abbrev. If offset is not equal to nullptr, the information parsed by -%z (if present) will be placed in *offset. +%z (if present) will be placed in *offset. If an invalid date +is parsed, or a time of day which is outside of the conventional bounds, failbit +will be set and tp will not be altered.

@@ -1907,7 +1909,9 @@ from_stream(std::basic_istream<CharT, Traits>& is, const CharT* fmt, If abbrev is not equal to nullptr, the information parsed by %Z (if present) will be placed in *abbrev. If offset is not equal to nullptr, the information parsed by -%z (if present) will be placed in *offset. +%z (if present) will be placed in *offset. If an invalid date +is parsed, or a time of day which is outside of the conventional bounds, failbit +will be set and tp will not be altered.