We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7fb3152 commit 2dfeee8Copy full SHA for 2dfeee8
1 file changed
tests/unittest.cpp
@@ -1954,15 +1954,11 @@ TEST_CASE("middleware_cookieparser_format")
1954
}
1955
// expires
1956
{
1957
- std::time_t tp;
1958
- std::time(&tp);
1959
- std::tm* tm = std::gmtime(&tp);
+ std::tm tm = {};
1960
std::istringstream ss("2000-11-01 23:59:59");
1961
- ss >> std::get_time(tm, "%Y-%m-%d %H:%M:%S");
1962
- std::mktime(tm);
1963
-
+ ss >> std::get_time(&tm, "%Y-%m-%d %H:%M:%S");
1964
auto c = Cookie("key", "value")
1965
- .expires(*tm);
+ .expires(tm);
1966
auto s = c.dump();
1967
CHECK(valid(s, 2));
1968
CHECK(s.find("Expires=Wed, 01 Nov 2000 23:59:59 GMT") != std::string::npos);
0 commit comments