Thanks for taking the time to help Paul.
A POSIX book I have said the TZ was required but did not state the format so
I was hoping to reverse it by looking at the environment variable. I did see
some variables in the header file(s) about timezones, including exactly what
I wanted, but they did not seem to be POSIX. Since Linux is my first port of
two, and possibly others, I am trying to be very strict Posix/Xopen and then
succumb to Gnu(libc) or system specifics.
--
Norman Black
Stony Brook Software
To reply via email reverse the identifiers in the domain.
> > I am porting from Win32 and I am trying to found the timezone
information.
> > Specifically the number of hours/minutes offset from UTC.
> > I found information that Posix requires the TZ environment variable but
no
> > such environment variable exists on my system, Mandrake 7.0.
> It doesn't? Try setting it and see what your programs do about that.
> I believe that the standards require that the system _use_ any TZ that is
> set, not that TZ _be_ set.
> > I thought
of
> > using gmtime and localtime and converting back to seconds and
subtracting
> > but mktime does a UTC conversion.
> > I hope I do not have to do computation myself using gmtime and
localtime. I
> > was hoping the system would have an API call to give me detailed
information
> > as Win32 does.
> Look in the (g)libc info pages in the node called "Functions and Variables
> for Time Zones".
> --