Piotr Caban : msvcrt: Fix _strtime implementation in Hindi locale.

Alexandre Julliard julliard at winehq.org
Mon Dec 13 15:59:53 CST 2021


Module: wine
Branch: master
Commit: 2f2891e5d59dcec5810ca6809eb857bcfc29aae4
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=2f2891e5d59dcec5810ca6809eb857bcfc29aae4

Author: Piotr Caban <piotr at codeweavers.com>
Date:   Mon Dec 13 17:19:14 2021 +0100

msvcrt: Fix _strtime implementation in Hindi locale.

Signed-off-by: Piotr Caban <piotr at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/msvcrt/time.c | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/dlls/msvcrt/time.c b/dlls/msvcrt/time.c
index c246c9a42fd..fb91aa2b1ec 100644
--- a/dlls/msvcrt/time.c
+++ b/dlls/msvcrt/time.c
@@ -611,7 +611,18 @@ int CDECL _wstrdate_s(wchar_t* date, size_t size)
  */
 char* CDECL _strtime(char* time)
 {
-    GetTimeFormatA(LOCALE_NEUTRAL, 0, NULL, "HH':'mm':'ss", time, 9);
+    SYSTEMTIME st;
+
+    GetLocalTime(&st);
+    time[0] = '0' + st.wHour / 10;
+    time[1] = '0' + st.wHour % 10;
+    time[2] = ':';
+    time[3] = '0' + st.wMinute / 10;
+    time[4] = '0' + st.wMinute % 10;
+    time[5] = ':';
+    time[6] = '0' + st.wSecond / 10;
+    time[7] = '0' + st.wSecond % 10;
+    time[8] = 0;
     return time;
 }
 




More information about the wine-cvs mailing list