gui/dboxinfo: localize (partially based on patch from Benny -- thanks!)

Conflicts:
	src/gui/dboxinfo.cpp
This commit is contained in:
martii
2014-05-24 15:27:19 +02:00
committed by [CST] Focus
parent 247e38a204
commit 742760dbd3
8 changed files with 232 additions and 122 deletions

View File

@@ -398,6 +398,12 @@ std::string strftime(const char *format, const struct tm *tm)
return std::string(buf);
}
std::string strftime(const char *format, time_t when, bool gm)
{
struct tm *t = gm ? gmtime(&when) : localtime(&when);
return strftime(format, t);
}
time_t toEpoch(std::string &date)
{
struct tm t;