From 3686026dedc90cca01b861672f13dfd3e02fec0e Mon Sep 17 00:00:00 2001 From: Alexander Babikov <2708460+lemondrops@users.noreply.github.com> Date: Thu, 22 Jun 2023 21:53:15 +0500 Subject: [PATCH 1/2] qt: plat_tempfile: Fix milliseconds being appended twice --- src/qt/qt_platform.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qt/qt_platform.cpp b/src/qt/qt_platform.cpp index 749be8b43..9f4c5ca6e 100644 --- a/src/qt/qt_platform.cpp +++ b/src/qt/qt_platform.cpp @@ -316,7 +316,7 @@ plat_tempfile(char *bufp, char *prefix, char *suffix) name.append(QString("%1-").arg(prefix)); } - name.append(QDateTime::currentDateTime().toString("yyyyMMdd-hhmmss-zzzz")); + name.append(QDateTime::currentDateTime().toString("yyyyMMdd-hhmmss-zzz")); if (suffix) name.append(suffix); strcpy(bufp, name.toUtf8().data()); From a995695a040f6277815ac01b59c131e2ca83f928 Mon Sep 17 00:00:00 2001 From: Alexander Babikov <2708460+lemondrops@users.noreply.github.com> Date: Thu, 29 Jun 2023 17:17:41 +0500 Subject: [PATCH 2/2] win: plat_tempfile: Use local time instead of UTC --- src/win/win.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/win/win.c b/src/win/win.c index 4d3b7c1a0..f166d559d 100644 --- a/src/win/win.c +++ b/src/win/win.c @@ -626,7 +626,7 @@ plat_tempfile(char *bufp, char *prefix, char *suffix) else strcpy(bufp, ""); - GetSystemTime(&SystemTime); + GetLocalTime(&SystemTime); sprintf(&bufp[strlen(bufp)], "%d%02d%02d-%02d%02d%02d-%03d%s", SystemTime.wYear, SystemTime.wMonth, SystemTime.wDay, SystemTime.wHour, SystemTime.wMinute, SystemTime.wSecond,