Fix the timestamp timezone in tracing in Windows (#5049)

It seems that printing out timezone information for a tm structure on Windows always shows the local timezone, even if the tm is returned by gmtime.
The simplest fix seems to be to simply print out GMT always, after all gmtime always returns GMT time.
This also makes the output match Linux formating as Windows otherwise uses verbose zone names, while Linux uses abbreviations.
This commit is contained in:
Vitek Karas 2019-01-29 01:08:53 -08:00 коммит произвёл GitHub
Родитель 45f9401bf6
Коммит ed4f73a931
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -50,7 +50,7 @@ pal::string_t pal::get_timestamp()
std::time_t t = std::time(0);
const std::size_t elems = 100;
char_t buf[elems];
std::wcsftime(buf, elems, _X("%c %Z"), std::gmtime(&t));
std::wcsftime(buf, elems, _X("%c GMT"), std::gmtime(&t));
return pal::string_t(buf);
}