Allow parsing %Ez to parse only 1 hour digit.

This commit is contained in:
Howard Hinnant
2017-03-17 20:18:06 -04:00
parent d110f07f59
commit dbee0e7da4

2
date.h
View File

@ -5986,7 +5986,7 @@ from_stream(std::basic_istream<CharT, Traits>& is, const CharT* fmt,
if (modified == CharT{})
read(is, rs{H, 2, 2}, ru{M, 2, 2});
else
read(is, rs{H, 2, 2}, CharT{':'}, ru{M, 2, 2});
read(is, rs{H, 1, 2}, CharT{':'}, ru{M, 2, 2});
if (!is.fail())
temp_offset = hours{H} + minutes{M};
command = nullptr;