Use fmt::localtime() in info.cpp

This commit is contained in:
Richard Berger
2021-05-10 16:12:44 -04:00
parent a687868c69
commit 51847f70f2

View File

@ -42,11 +42,11 @@
#include "text_file_reader.h" #include "text_file_reader.h"
#include "update.h" #include "update.h"
#include "variable.h" #include "variable.h"
#include "fmt/chrono.h"
#include <cctype> #include <cctype>
#include <cmath> #include <cmath>
#include <cstring> #include <cstring>
#include <ctime>
#include <map> #include <map>
#ifdef _WIN32 #ifdef _WIN32
@ -265,8 +265,8 @@ void Info::command(int narg, char **arg)
if (out == nullptr) return; if (out == nullptr) return;
fputs("\nInfo-Info-Info-Info-Info-Info-Info-Info-Info-Info-Info\n",out); fputs("\nInfo-Info-Info-Info-Info-Info-Info-Info-Info-Info-Info\n",out);
time_t now = time(nullptr); std::time_t now = std::time(nullptr);
fmt::print(out,"Printed on {}\n",ctime(&now)); fmt::print(out,"Printed on {:%a %b %d %H:%M:%S %Y}\n", fmt::localtime(now));
if (flags & CONFIG) { if (flags & CONFIG) {
fmt::print(out,"\nLAMMPS version: {} / {}\n", fmt::print(out,"\nLAMMPS version: {} / {}\n",