UI: Do not localize timestamp in log file

Millisecond time in the log was added in 36ad777b8 but the millisecond
was not always added just after the second digits depending on locale
settings. To make consistency in the log file, `%T` is specified for
`strtime` instead of `%X` so that the time format is not localized.
This commit is contained in:
Norihiro Kamae
2022-01-04 02:02:59 -08:00
committed by Jim
parent 9f15a58483
commit 2fc83f9408
+1 -1
View File
@@ -245,7 +245,7 @@ string CurrentTimeString()
auto now = system_clock::to_time_t(tp);
tstruct = *localtime(&now);
size_t written = strftime(buf, sizeof(buf), "%X", &tstruct);
size_t written = strftime(buf, sizeof(buf), "%T", &tstruct);
if (ratio_less<system_clock::period, seconds::period>::value &&
written && (sizeof(buf) - written) > 5) {
auto tp_secs = time_point_cast<seconds>(tp);