[uae] Re: Clock fixes

On Wed, 28 Jul 2004 08:49:04 -0500
Richard Drummond <evilrich@xxxxxxxxxxxxxx> wrote:

[...]
> What I'm trying to do is find the timezone offset. The problem is that the 
> time-stamp on a file returned by the stat() function is in UTC, while the 
> Amiga needs a timestamp in the local timezone. The timezone_r() and timegm() 
> pair in the the get_time() patch take care of this.
> 
> Another alternative would be to call tzset() and use the global variable 
> timezone offset (which should be the offset in seconds) directly. The 
> timezone global is a SYSV addition, however, so is also not POSIX compliant.
> 
> Cheers,
> Rich
>

What about localtime_r()? It seems to be somewhat portable (At least Solaris 
and Linux have it).

Regards,
        Elmar Plischke

Other related posts: