return std::pair<bool, time_t>( false, 0 );
}
- std::tm t;
+ std::tm t = {};
t.tm_sec = 0;
t.tm_min = 0;
t.tm_hour = 0;
- t.tm_year = std::stoi( date.substr( 0, 4 ) ) - 1900;
- t.tm_mon = std::stoi( date.substr( 5, 2 ) ) - 1;
t.tm_mday = std::stoi( date.substr( 8, 2 ) );
- t.tm_wday = 0; /* Day of the week (0-6, Sunday = 0) */
- t.tm_yday = 0; /* Day in the year (0-365, 1 Jan = 0) */
- t.tm_isdst = 0; /* Daylight saving time */
+ t.tm_mon = std::stoi( date.substr( 5, 2 ) ) - 1;
+ t.tm_year = std::stoi( date.substr( 0, 4 ) ) - 1900;
setenv( "TZ", "UTC", 1 );
tzset();