timestamp with time zone output incorrect

From: Steve Martin <steve(dot)martin(at)nec(dot)co(dot)nz>
To: pgsql-general(at)postgresql(dot)org
Subject: timestamp with time zone output incorrect
Date: 2008-04-24 06:30:27
Message-ID: 48102903.4070403@nec.co.nz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

We are having trouble with the output of timestamp with time zone with
versions 8.1.10 and 8.3.1.
It seems reversed, and change over times are incorrect.

timezone for both is:
=> show timezone ;
TimeZone
-------------
NZST-12NZDT
(1 row)

Note, change over times for this year is:
Sun Apr 06 02:59:59 NZDT 2008 --> Sun Apr 06 02:00:00 NZST 2008
Sun Sep 28 01:59:59 NZST 2008 --> Sun Sep 28 03:00:00 NZDT 2008

On both versions:
=> select timestamp with time zone '2008-01-01 00:00:00';
timestamptz
------------------------
2008-01-01 00:00:00+12

=> select timestamp with time zone '2008-05-01 00:00:00';
timestamptz
------------------------
2008-05-01 00:00:00+13
(1 row)

It seems that the time zone off set is reversed.

Also it seems to be using the old change over times.
=> select timestamp with time zone '2008-03-09 01:00:00';
timestamptz
------------------------
2008-03-09 01:00:00+12
(1 row)

=> select timestamp with time zone '2008-03-09 03:00:00';
timestamptz
------------------------
2008-03-09 03:00:00+13
(1 row)

Checked "postgresql-8.3.1/src/timezone/data/australasia" and the
information here seems correct.

The date on the system (HPUX 11.23) is correct, e.g.
% date
Thu Apr 24 18:22:42 NZST 2008
% echo $TZ
NZST-12NZDT

The database seems to know we are using the New Zealand time zone. It
seems to think summer is coming it is winter.

Any ideas anyone?

Thanks
Steve Martin

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Martijn van Oosterhout 2008-04-24 07:31:14 Re: error connecting to database: could not open relation
Previous Message Klint Gore 2008-04-24 06:04:21 Re: Table with differerent Data Types