Piotr Caban : msvcrt: Fix _strdate implementation in Hindi locale.
Module: wine Branch: master Commit: 0e9431b809fd12d1055baa99bee07a02af2d7a4d URL: https://source.winehq.org/git/wine.git/?a=commit;h=0e9431b809fd12d1055baa99b... Author: Piotr Caban <piotr(a)codeweavers.com> Date: Mon Dec 13 17:19:10 2021 +0100 msvcrt: Fix _strdate implementation in Hindi locale. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)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 9abd1f5555b..c246c9a42fd 100644 --- a/dlls/msvcrt/time.c +++ b/dlls/msvcrt/time.c @@ -538,7 +538,18 @@ struct tm* CDECL _gmtime32(const __time32_t* secs) */ char* CDECL _strdate(char* date) { - GetDateFormatA(LOCALE_NEUTRAL, 0, NULL, "MM'/'dd'/'yy", date, 9); + SYSTEMTIME st; + + GetLocalTime(&st); + date[0] = '0' + st.wMonth / 10; + date[1] = '0' + st.wMonth % 10; + date[2] = '/'; + date[3] = '0' + st.wDay / 10; + date[4] = '0' + st.wDay % 10; + date[5] = '/'; + date[6] = '0' + st.wYear / 10 % 10; + date[7] = '0' + st.wYear % 10; + date[8] = 0; return date; }
participants (1)
-
Alexandre Julliard