From 7fcca6670da4135588b1e0cc6fe137b83dc3ec39 Mon Sep 17 00:00:00 2001 From: wolfcomp <4028289+wolfcomp@users.noreply.github.com> Date: Tue, 10 Dec 2024 16:24:50 +0100 Subject: [PATCH 1/3] add timezone offset to system time --- DalamudCrashHandler/DalamudCrashHandler.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/DalamudCrashHandler/DalamudCrashHandler.cpp b/DalamudCrashHandler/DalamudCrashHandler.cpp index 4b1d4a6e5a..d707d38b2b 100644 --- a/DalamudCrashHandler/DalamudCrashHandler.cpp +++ b/DalamudCrashHandler/DalamudCrashHandler.cpp @@ -941,7 +941,8 @@ int main() { log << std::format(L"Dump at: {}", dumpPath.wstring()) << std::endl; else log << std::format(L"Dump error: {}", dumpError) << std::endl; - log << L"System Time: " << std::chrono::system_clock::now() << std::endl; + log << L"System Time: " << std::chrono::system_clock::now(); + log << std::format(L"{0:%z}", std::chrono::current_zone()->get_info(std::chrono::system_clock::now())) << std::endl; log << L"\n" << stackTrace << std::endl; if (pProgressDialog) From 189c33c73559bff951dcb784e2001eca317c9277 Mon Sep 17 00:00:00 2001 From: wolfcomp <4028289+wolfcomp@users.noreply.github.com> Date: Thu, 12 Dec 2024 03:03:18 +0100 Subject: [PATCH 2/3] cpp 20 on ward forces UTC return --- DalamudCrashHandler/DalamudCrashHandler.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/DalamudCrashHandler/DalamudCrashHandler.cpp b/DalamudCrashHandler/DalamudCrashHandler.cpp index d707d38b2b..684fa4ea01 100644 --- a/DalamudCrashHandler/DalamudCrashHandler.cpp +++ b/DalamudCrashHandler/DalamudCrashHandler.cpp @@ -941,8 +941,7 @@ int main() { log << std::format(L"Dump at: {}", dumpPath.wstring()) << std::endl; else log << std::format(L"Dump error: {}", dumpError) << std::endl; - log << L"System Time: " << std::chrono::system_clock::now(); - log << std::format(L"{0:%z}", std::chrono::current_zone()->get_info(std::chrono::system_clock::now())) << std::endl; + log << L"System Time: " << std::chrono::system_clock::now() << L"+0000" << std::endl; log << L"\n" << stackTrace << std::endl; if (pProgressDialog) From 27502bdfae93136af893734a0721babdb5b415d3 Mon Sep 17 00:00:00 2001 From: wolfcomp <4028289+wolfcomp@users.noreply.github.com> Date: Thu, 12 Dec 2024 22:51:30 +0100 Subject: [PATCH 3/3] use formatting instead of hard setting UTC offset just in case --- DalamudCrashHandler/DalamudCrashHandler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DalamudCrashHandler/DalamudCrashHandler.cpp b/DalamudCrashHandler/DalamudCrashHandler.cpp index 684fa4ea01..62ccdd20ae 100644 --- a/DalamudCrashHandler/DalamudCrashHandler.cpp +++ b/DalamudCrashHandler/DalamudCrashHandler.cpp @@ -941,7 +941,7 @@ int main() { log << std::format(L"Dump at: {}", dumpPath.wstring()) << std::endl; else log << std::format(L"Dump error: {}", dumpError) << std::endl; - log << L"System Time: " << std::chrono::system_clock::now() << L"+0000" << std::endl; + log << std::format(L"System Time: {0:%F} {0:%T} {0:%Ez}", std::chrono::system_clock::now()) << std::endl; log << L"\n" << stackTrace << std::endl; if (pProgressDialog)