mirror of
https://github.com/LibreOffice/online.git
synced 2025-08-16 17:42:05 +00:00
wsd: put_time is not supported by gcc4.8
Change-Id: Ib3b6a115ba669051474e327944cb4677575d15f3 Reviewed-on: https://gerrit.libreoffice.org/32917 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com>
This commit is contained in:

committed by
Ashod Nakashian

parent
f25f434be3
commit
89bd85fbba
@ -158,9 +158,22 @@ namespace Log
|
||||
const std::time_t t = std::time(nullptr);
|
||||
oss.str("");
|
||||
oss.clear();
|
||||
oss << "Initializing " << name << ". Local time: " << std::put_time(std::localtime(&t), "%c %Z")
|
||||
<< ". UTC: " << std::put_time(std::gmtime(&t), "%c %Z")
|
||||
<< ". Log level is [" << logger.getLevel() << "].";
|
||||
|
||||
oss << "Initializing " << name << ".";
|
||||
|
||||
// TODO: replace with std::put_time when we move to gcc 5+.
|
||||
char buf[32];
|
||||
if (strftime(buf, sizeof(buf), "%a %F %T%z", std::localtime(&t)) > 0)
|
||||
{
|
||||
oss << " Local time: " << buf << ".";
|
||||
}
|
||||
|
||||
if (strftime(buf, sizeof(buf), "%a %F %T%z", std::gmtime(&t)) > 0)
|
||||
{
|
||||
oss << " UTC time: " << buf << ".";
|
||||
}
|
||||
|
||||
oss << " Log level is [" << logger.getLevel() << "].";
|
||||
info(oss.str());
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user