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;
}