Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

timestamp with time zone output incorrect



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




Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group