[PATCH 1/2] ucrtbase: Correct behavior of strftime format %c.

Piotr Caban piotr.caban at gmail.com
Thu Nov 28 08:00:46 CST 2019


Hi Jeff,

On 11/28/19 8:57 AM, Jeff Smith wrote:
> +#if _MSVCR_VER>=140
> +            if(time_data == MSVCRT_locale->locinfo->lc_time_curr && !alternate)
> +            {
> +                static const WCHAR datetime_format[] =
> +                        { '%','a',' ','%','b',' ','%','e',' ','%','T',' ','%','Y',0 };
> +                tmp = strftime_impl(str+ret, max-ret, datetime_format, mstm, time_data, loc);
> +                if(!tmp)
> +                    return 0;
> +                ret += tmp;
It's not working as expected when non C locale is used. You can also 
break inside the if to avoid modifying the other case.

Thanks,
Piotr



More information about the wine-devel mailing list