We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0c05b66 commit ee36e11Copy full SHA for ee36e11
tests/std/tests/Dev11_0836436_get_time/test.cpp
@@ -794,16 +794,17 @@ void test_invalid_argument() {
794
time_t t = time(nullptr);
795
tm currentTime;
796
localtime_s(¤tTime, &t);
797
+ currentTime.tm_hour = 25; // set invalid hour
798
799
{
800
wstringstream wss;
- wss << put_time(¤tTime, L"%Y-%m-%d-%H-%M-%s");
801
+ wss << put_time(¤tTime, L"%Y-%m-%d-%H-%M");
802
assert(wss.rdstate() == ios_base::badbit);
803
}
804
805
806
stringstream ss;
- ss << put_time(¤tTime, "%Y-%m-%d-%H-%M-%s");
807
+ ss << put_time(¤tTime, "%Y-%m-%d-%H-%M");
808
assert(ss.rdstate() == ios_base::badbit);
809
810
#endif // _M_CEE_PURE
0 commit comments