diff options
author | George Hazan <george.hazan@gmail.com> | 2024-04-08 21:49:27 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2024-04-08 21:49:27 +0300 |
commit | 102ceb42c38c52155e810fd96f8987e81c5dc8be (patch) | |
tree | bd3995c477a84f7b3325dd5da2cd797cfff59012 /plugins/CrashDumper/src/utils.cpp | |
parent | 89424edebf983affdd417cb5767cf0e2a0171699 (diff) |
fixes #4327 (CrashDumper: плагин не может корректно показать дату в Windows XP)
Diffstat (limited to 'plugins/CrashDumper/src/utils.cpp')
-rw-r--r-- | plugins/CrashDumper/src/utils.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/CrashDumper/src/utils.cpp b/plugins/CrashDumper/src/utils.cpp index 3c35fa86dd..89e2392f9f 100644 --- a/plugins/CrashDumper/src/utils.cpp +++ b/plugins/CrashDumper/src/utils.cpp @@ -53,10 +53,12 @@ CMStringW GetISO8061Time(SYSTEMTIME *stLocal) CMStringW ret;
if (g_plugin.bClassicDates) {
wchar_t buf[100];
- GetDateFormatW(LOCALE_CUSTOM_DEFAULT, DATE_LONGDATE, stLocal, 0, buf, _countof(buf));
+ if (!GetDateFormatW(LOCALE_CUSTOM_DEFAULT, DATE_LONGDATE, stLocal, 0, buf, _countof(buf)))
+ GetDateFormatW(LOCALE_CUSTOM_DEFAULT, 0, stLocal, L"d MMM yyyy", buf, _countof(buf));
ret.AppendFormat(L"%s ", buf);
- GetTimeFormatW(LOCALE_CUSTOM_DEFAULT, 0, stLocal, 0, buf, _countof(buf));
+ if (!GetTimeFormatW(LOCALE_CUSTOM_DEFAULT, 0, stLocal, 0, buf, _countof(buf)))
+ GetTimeFormatW(LOCALE_CUSTOM_DEFAULT, 0, stLocal, L"H:mm:ss", buf, _countof(buf));
ret.Append(buf);
}
else {
|