Included functionality to describe the document in the input file
[biaweb2.git] / biawebdoclist.hpp
index 7c4efcd..547664a 100644 (file)
@@ -68,11 +68,15 @@ namespace biaweb {
         std::string templstr ((std::istreambuf_iterator<char> (templ)),
                             (std::istreambuf_iterator<char> ()) );
         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;
     }