Skip to content

Commit

Permalink
dbcopy: use less fancy time format
Browse files Browse the repository at this point in the history
This patch replaces "%F %T" with the equivalent (and more portable) long
variant "%Y-%m-%d %H:%M:%S", so that Windows build will show progress,
too.
  • Loading branch information
arogge committed Nov 2, 2021
1 parent 31a5e6f commit 7225e35
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/src/dird/dbcopy/progress.cc
Expand Up @@ -134,7 +134,8 @@ static std::string FormatTime(time_point<system_clock> tp)
std::time_t time = system_clock::to_time_t(tp);
std::array<char, Progress::default_timestring_size> buffer{};

std::strftime(buffer.data(), buffer.size(), "%F %T", std::localtime(&time));
std::strftime(buffer.data(), buffer.size(), "%Y-%m-%d %H:%M:%S",
std::localtime(&time));

return std::string(buffer.data());
}
Expand Down

0 comments on commit 7225e35

Please sign in to comment.