diff --git a/src/cmdstan/write_datetime.hpp b/src/cmdstan/write_datetime.hpp index 02887ed023..91dfc3f1a2 100644 --- a/src/cmdstan/write_datetime.hpp +++ b/src/cmdstan/write_datetime.hpp @@ -9,22 +9,20 @@ namespace cmdstan { -void write_datetime(stan::callbacks::writer &writer) { +void write_datetime(stan::callbacks::writer& writer) { const std::time_t current_datetime = std::chrono::system_clock::to_time_t(std::chrono::system_clock::now()); std::tm* curr_tm = std::localtime(¤t_datetime); std::stringstream current_datetime_msg; - current_datetime_msg << "start_datetime = " - << std::setfill('0') << (1900+curr_tm->tm_year) << "-" - << std::setw(2) << (curr_tm->tm_mon+1) << "-" - << std::setw(2) << curr_tm->tm_mday << " " - << std::setw(2) << curr_tm->tm_hour << ":" - << std::setw(2) << curr_tm->tm_min << ":" - << std::setw(2) << curr_tm->tm_sec; + current_datetime_msg << "start_datetime = " << std::setfill('0') + << (1900 + curr_tm->tm_year) << "-" << std::setw(2) + << (curr_tm->tm_mon + 1) << "-" << std::setw(2) + << curr_tm->tm_mday << " " << std::setw(2) + << curr_tm->tm_hour << ":" << std::setw(2) + << curr_tm->tm_min << ":" << std::setw(2) + << curr_tm->tm_sec; writer(current_datetime_msg.str()); } - - } // namespace cmdstan #endif