Windows: use wcsftime instead of strftime

This commit is contained in:
Jean-Francois Dockes
2020-04-16 14:01:06 +01:00
parent 6037576912
commit 5fd492da57
6 changed files with 31 additions and 17 deletions
+1 -4
View File
@@ -196,13 +196,10 @@ void ResListPager::displayDoc(RclConfig *config, int i, Rcl::Doc& doc,
// Document date: either doc or file modification times
string datebuf;
if (!doc.dmtime.empty() || !doc.fmtime.empty()) {
char cdate[100];
cdate[0] = 0;
time_t mtime = doc.dmtime.empty() ?
atoll(doc.fmtime.c_str()) : atoll(doc.dmtime.c_str());
struct tm *tm = localtime(&mtime);
strftime(cdate, 99, dateFormat().c_str(), tm);
transcode(cdate, datebuf, RclConfig::getLocaleCharset(), "UTF-8");
datebuf = utf8datestring(dateFormat(), tm);
}
// Size information. We print both doc and file if they differ a lot