Re: Timezone fun (bugs and a request) - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Timezone fun (bugs and a request)
Date
Msg-id 29315.1085357318@sss.pgh.pa.us
Whole thread Raw
In response to Timezone fun (bugs and a request)  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
Responses Re: Timezone fun (bugs and a request)
List pgsql-hackers
Alvaro Herrera <alvherre@dcc.uchile.cl> writes:
> First I initdb'd without TZ set.  So every time I start the server I get
> LOG:  could not recognize system timezone, defaulting to "Etc/GMT-4"
> HINT:  You can specify the correct timezone in postgresql.conf.

I've fixed the minor issue here, which is that the sign is backwards ---
it ought to select "Etc/GMT+4".  The larger issue is that it's not
recognizing your system timezone because the only name it can cons up
for the zone is "CLT4CLST", which doesn't work because it has the wrong
DST rules.  (I think it's just luck that it realizes that, actually :-().

Magnus and I had talked off-list about a smarter routine to recognize
the system timezone without a TZ setting, but the only idea we've had is
to grovel through each and every timezone file in the zic database,
which doesn't seem real appealing.

> Note I get +4 on the default zone and -4 on the correct zone.  I think
> this is a bug.

Right, that much is fixed anyway.

> After this, DST works correctly, but I continue to receive the LOG
> message above.  I think it should be supressed.

Fixed.

> timezone = unknown
> The server now behaves different; the timezone is set to GMT rather than
> being guessed from system settings.  I think they should work the same.

Fixed.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Timezone fun (bugs and a request)
Next
From: "Marc G. Fournier"
Date:
Subject: Re: