Re: Timezone fun (bugs and a request)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
Cc: Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Timezone fun (bugs and a request)
Date: 2004-05-24 00:08:38
Message-ID: 29315.1085357318@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Marc G. Fournier 2004-05-24 00:42:56 Re:
Previous Message Alvaro Herrera 2004-05-23 21:22:26 Re: relcache refcount