8static void test(time_t
t,
const char* s)
10 REQUIRE(strlen(s) >= 24);
17 putenv(
const_cast<char*
>(
"TZ=UTC")); tzset();
18 test( 0,
"Thu Jan 01 00:00:00 1970");
19 test( 1,
"Thu Jan 01 00:00:01 1970");
20 test( 60,
"Thu Jan 01 00:01:00 1970");
21 test( 3600,
"Thu Jan 01 01:00:00 1970");
22 test(1318850077,
"Mon Oct 17 11:14:37 2011");
23 test(1403092862,
"Wed Jun 18 12:01:02 2014");
std::string toString(time_t time)
time_t fromString(std::span< const char, 24 > s)
constexpr time_t INVALID_TIME_T
This file implemented 3 utility functions: