Hi Elmar
On Wednesday 28 July 2004 09:36 am, elmar@xxxxxxxxxxxxxxxxxx wrote:
> What about localtime_r()? It seems to be somewhat portable (At least
> Solaris and Linux have it).
All I want is the timezone offset in seconds. I don't want to have to convert
between a struct tm time-stamp and an AmigaDOS time-stamp (in days, mins and
ticks).
By doing localtime_r (which takes account of the timezone) and converting back
to a time_t in seconds with gmtime (which doesn't), this effectively gives
the local time in seconds. However, this is non-portable. Getting the
timezone offset in seconds from the timezone global also appears to be
non-portable (but perhaps more portable than the above-mentioned solution).
Cheers,
Rich