X-Git-Url: https://harishankar.org/repos/?p=biaweb2.git;a=blobdiff_plain;f=biawebdoclist.hpp;h=547664a12be50fefe331e4dedd29a25aec88ebfd;hp=7c4efcdc01fed3cc48618d1dab7aa241bbae921b;hb=26b38b4a38c24955293a7144f1e1d74676601caf;hpb=fe9a0fef0b31ee3b94b3e73b7e319087a49a3054 diff --git a/biawebdoclist.hpp b/biawebdoclist.hpp index 7c4efcd..547664a 100644 --- a/biawebdoclist.hpp +++ b/biawebdoclist.hpp @@ -68,11 +68,15 @@ namespace biaweb { std::string templstr ((std::istreambuf_iterator (templ)), (std::istreambuf_iterator ()) ); templ.close (); + + std::tm c, m; + c = *std::localtime (&this->ctime); + m = *std::localtime (&this->mtime); std::string outputhtml = fmt::format (templstr, fmt::arg("url", this->url), fmt::arg("doctitle", this->title), - fmt::arg("cdate", *std::localtime (&this->ctime)), - fmt::arg("mdate", *std::localtime (&this->mtime))); + fmt::arg("cdate", c), + fmt::arg("mdate", m)); return outputhtml; }