Skip to content

Commit

Permalink
[Jenkins] auto-formatting by clang-format version 6.0.0-1ubuntu2~16.0…
Browse files Browse the repository at this point in the history
…4.1 (tags/RELEASE_600/final)
  • Loading branch information
stan-buildbot committed May 8, 2021
1 parent 32a8b49 commit 4eab50a
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions src/cmdstan/write_datetime.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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(&current_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

0 comments on commit 4eab50a

Please sign in to comment.