Changed time type from std::tm to std::time_t