Gui: add parameter to adjust the date format used in the result list
This commit is contained in:
@@ -161,7 +161,7 @@ void ResListPager::displayDoc(RclConfig *config,
|
||||
time_t mtime = doc.dmtime.empty() ?
|
||||
atol(doc.fmtime.c_str()) : atol(doc.dmtime.c_str());
|
||||
struct tm *tm = localtime(&mtime);
|
||||
strftime(datebuf, 99, " %Y-%m-%d %H:%M:%S %z", tm);
|
||||
strftime(datebuf, 99, dateFormat().c_str(), tm);
|
||||
}
|
||||
|
||||
// Size information. We print both doc and file if they differ a lot
|
||||
@@ -414,3 +414,9 @@ const string &ResListPager::parFormat()
|
||||
return cstr_format;
|
||||
}
|
||||
|
||||
const string &ResListPager::dateFormat()
|
||||
{
|
||||
static const string cstr_format(" %Y-%m-%d %H:%M:%S %z");
|
||||
return cstr_format;
|
||||
}
|
||||
|
||||
|
||||
@@ -106,6 +106,7 @@ public:
|
||||
virtual string trans(const string& in);
|
||||
virtual string detailsLink();
|
||||
virtual const string &parFormat();
|
||||
virtual const string &dateFormat();
|
||||
virtual string nextUrl();
|
||||
virtual string prevUrl();
|
||||
virtual string pageTop() {return string();}
|
||||
|
||||
Reference in New Issue
Block a user