Re: Timezone fun (bugs and a request)

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>, Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Timezone fun (bugs and a request)
Date: 2004-05-25 04:14:20
Message-ID: 40B2C81C.8070108@opencloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Oliver Jowett <oliver(at)opencloud(dot)com> writes:
>
>>Also, unless I'm missing something, shouldn't Chile (Alvaro's timezone?)
>>be behind GMT (GMT-something) not ahead of it (GMT+something)?
>
>
> Part of the confusion here is that the zone names in the zic database
> follow POSIX rules: plus is west of Greenwich. AFAICS it's doing the
> right thing in selecting Etc/GMT-12 for you.

Ew! That's disgusting! What possessed POSIX to do this the opposite way
to pretty much everything else?

> Have you checked the
> actual time values reported by the server to see if they look okay?

Indeed, the timezone is actually correct:

oliver=# select now();
now
-------------------------------
2004-05-25 16:08:05.688408+12
(1 row)

What confused me is that the times in the log don't follow the
SQL-and-everything-else convention:

LOG: database system was shut down at 2004-05-25 15:15:44 GMT-12

For comparison, 7.4.1 on the same system says:

LOG: database system was shut down at 2004-05-25 16:03:43 NZST

and apache says:

127.0.0.1 - - [25/May/2004:16:06:16 +1200] "GET / HTTP/1.0" 200 4110
"-" "Wget/1.9.1"

> I'm a bit hesitant to reverse the sign convention in the zic database to
> agree with SQL conventions --- that seems certain to lead to even more
> confusion.

Can we keep the zic database convention unchanged but change the display
format in the logs to be consistent with the SQL conventions?

-O

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2004-05-25 04:35:43 Re: Timezone fun (bugs and a request)
Previous Message Bruce Momjian 2004-05-25 04:03:39 pg_ctl.c