We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3cb8078 commit c96fae6Copy full SHA for c96fae6
1 file changed
src/log.cppm
@@ -78,7 +78,11 @@ std::string timestamp() {
78
auto ms = std::chrono::duration_cast<std::chrono::milliseconds>(
79
now.time_since_epoch()) % 1000;
80
std::tm tm{};
81
+#if defined(_WIN32)
82
+ localtime_s(&tm, &tt);
83
+#else
84
localtime_r(&tt, &tm);
85
+#endif
86
char buf[32];
87
std::snprintf(buf, sizeof(buf), "%04d-%02d-%02d %02d:%02d:%02d.%03d",
88
tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday,
0 commit comments