From 51847f70f2368d4f321eae96d01caefc7ac45484 Mon Sep 17 00:00:00 2001 From: Richard Berger Date: Mon, 10 May 2021 16:12:44 -0400 Subject: [PATCH] Use fmt::localtime() in info.cpp --- src/info.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/info.cpp b/src/info.cpp index cae3865785..4a91f41672 100644 --- a/src/info.cpp +++ b/src/info.cpp @@ -42,11 +42,11 @@ #include "text_file_reader.h" #include "update.h" #include "variable.h" +#include "fmt/chrono.h" #include #include #include -#include #include #ifdef _WIN32 @@ -265,8 +265,8 @@ void Info::command(int narg, char **arg) if (out == nullptr) return; fputs("\nInfo-Info-Info-Info-Info-Info-Info-Info-Info-Info-Info\n",out); - time_t now = time(nullptr); - fmt::print(out,"Printed on {}\n",ctime(&now)); + std::time_t now = std::time(nullptr); + fmt::print(out,"Printed on {:%a %b %d %H:%M:%S %Y}\n", fmt::localtime(now)); if (flags & CONFIG) { fmt::print(out,"\nLAMMPS version: {} / {}\n",