Re: Is this a Wine bug, or a Windows bug?

Tamir Evan <[email protected]> Wed, 13 May 2020 17:02:55 +0300
Newsgroups gmane.comp.gnu.mingw.user
Message-ID <CADjfb0yMebvq0itzVKYXJWK0X=H5u7BTYBxpAdk7-qryH7iaWA@mail.gmail.com>
On Wed, May 13, 2020 at 4:19 PM Keith Marshall <[email protected]> wrote:
>
> I suspect that it's probably the former, but I no longer have ready
> access to a Windows host, on which to test.  The following toy program:
>
>   #include <time.h>
>   #include <stdio.h>
>
>   #ifdef _WIN32
>   #define localtime _localtime64
>   #endif
>
>   int main()
>   {
>     struct timespec now;
>     if( clock_gettime( CLOCK_REALTIME, &now ) == 0 )
>     {
>       char buf[64];
>       if( strftime( buf, sizeof buf, "%Y-%m-%d %H:%M %z",
>           localtime( &now.tv_sec ) )
>         != 0 )
>           printf( "%s\n", buf );
>     }
>     return 0;
>   }
>
> when cross-compiled, and run under wine-5.7, results in output which is
> similar to:
>
>   $ mingw32-gcc foo.c
>   $ ./a.exe
>   2020-05-13 13:46 GMT Daylight Time

Under Windows 7, compiling and running the above code in MSYS, I get:

    $ mingw32-gcc foo.c
    $ ./a
    2020-05-13 16:37 Jerusalem Daylight Time

Tamir Evan.

_______________________________________________
MinGW-Users mailing list
[email protected]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.osdn.me/mailman/listinfo/mingw-users
Also: mailto:[email protected]?subject=unsubscribe