mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-10-24 23:33:47 +08:00
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:
+1
-1
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user