Re: [HACKERS] Timezone problems / HAVE_INT_TIMEZINE

From: Dwayne Bailey <dwayne(at)mika(dot)com>
To: "Thomas G(dot) Lockhart" <lockhart(at)alumni(dot)caltech(dot)edu>
Cc: "Pedro J(dot) Lobo" <pjlobo(at)euitt(dot)upm(dot)es>, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Timezone problems / HAVE_INT_TIMEZINE
Date: 1998-03-19 13:14:04
Message-ID: Pine.OSF.3.95.980319080513.9109A-100000@mika20.mika.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

-----BEGIN PGP SIGNED MESSAGE-----

Thomas G. Lockhart wrote:

> The 19 year differences usually seem to come from mis-handling the
> HAVE_INT_TIMEZONE compile-time option. How is yours set? Try changing it
> in config.h and see if it helps.
>

As far as I've been able to determine, the correct setting for
HAVE_INT_TIMEZONE (1) is being used in the Alpha port. It does
in fact define 'long timezone' (not 'int timezone') as being
available, as part of the tzset() man page. I have to admit that
I'm not familiar with the way that this is supposed to work, so
this may seem kind of dumb, but I did some experimenting on the
value of 'timezone' and 'tzname', since the contents of those
variable weren't documented anywhere that I could find in DEC's
man pages. I of course now know that tzname[0] is the base
timezone name, tzname[1] is the dst name, and timezone is the
number of seconds offset from GMT.

However, what I also discovered in that these values are not set
until after the tzset() routine is called. Is that normal
behavior? Doing a grep for tzset in the PG sources revealed
that it's only called for a few SQL commands. Is it called
anywhere as part of startup processing, and I'm just missing it?
Or is the DEC implementation the only one that requires an
explicit tzset() call before the use of these variables?

- --
Dwayne Bailey + WHAT is your name? Sir Galahad
MIKA Systems, Bingham Farms, MI + WHAT is your quest? I Seek the Holy Grail
dwayne(at)mika(dot)com + What is your favorite color?
http://www.mika.com/~dwayne + Blue ... no, Yelloooooooooooooooooow
finger dwayne(at)mika20(dot)mika(dot)com for PGP Public Key

-----BEGIN PGP SIGNATURE-----
Version: 2.6.2

iQB1AwUBNREaJqA2uleK7maRAQGvdwL9F5t3M1dK8Qf9MVWGa3CfKguegHyG/f9+
1Oe3OETtA5gI0GLUJkxgpVBQFMzT6kczju1AR6l7JcM2N+wXMk1lE5ULrLH96axd
T8sLQwkdjTWhNsnBBFulyocyoLPF7TzK
=SbKH
-----END PGP SIGNATURE-----

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Maarten Boekhold 1998-03-19 15:10:09 Re: [HACKERS] Timezone problems / HAVE_INT_TIMEZINE
Previous Message Michael Meskes 1998-03-19 10:41:06 Re: [HACKERS] another standards question