Skip to content

Commit 92f93f4

Browse files
committed
logging: Use ISO 8601 time format for logging
Switch locale-aware timestamping for logging / crash handling to %H:%M:%S
1 parent b643110 commit 92f93f4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

frontend/OBSApp.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ string CurrentDateTimeString()
278278
struct tm tstruct;
279279
char buf[80];
280280
tstruct = *localtime(&now);
281-
strftime(buf, sizeof(buf), "%Y-%m-%d, %X", &tstruct);
281+
strftime(buf, sizeof(buf), "%Y-%m-%d, %T", &tstruct);
282282
return buf;
283283
}
284284

@@ -898,7 +898,7 @@ static bool set_utf8_locale(void)
898898
blog(LOG_INFO, "Set locale to: %s", defaultLocale.name().c_str());
899899

900900
return usingUTF8;
901-
}
901+
}
902902

903903
OBSApp::OBSApp(int &argc, char **argv, profiler_name_store_t *store)
904904
: QApplication(argc, argv),

libobs/obs-win-crash-handler.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ static inline void write_header(struct exception_handler_data *data)
245245
time_t now = time(0);
246246
struct tm ts;
247247
ts = *localtime(&now);
248-
strftime(date_time, sizeof(date_time), "%Y-%m-%d, %X", &ts);
248+
strftime(date_time, sizeof(date_time), "%Y-%m-%d, %T", &ts);
249249

250250
const char *obs_bitness;
251251
if (sizeof(void *) == 8)

0 commit comments

Comments
 (0)