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

From Oliver Jowett
Subject Re: Timezone fun (bugs and a request)
Date
Msg-id 40B2C81C.8070108@opencloud.com
Whole thread Raw
In response to Re: Timezone fun (bugs and a request)  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Timezone fun (bugs and a request)  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Timezone fun (bugs and a request)  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
Tom Lane wrote:
> Oliver Jowett <oliver@opencloud.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


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: pg_ctl.c
Next
From: Tom Lane
Date:
Subject: Re: Timezone fun (bugs and a request)