2007 DST change not working

From: Frank Bax <fbax(at)sympatico(dot)ca>
To: pgsql-novice(at)postgresql(dot)org
Subject: 2007 DST change not working
Date: 2007-01-01 19:56:06
Message-ID: 5.2.1.1.0.20070101123009.042624d0@pop6.sympatico.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Another DST related problem in pgsql 8.1.5 ...

drop table dst;
create table dst (tz1 timestamp with time zone, tz2 timestamp with time
zone, tzage interval);
insert into dst ( select ('2005-01-02'::date+(days*7))::timestamptz as t1
from generate_series(0,150) as days );
update dst set tz2 = tz1::timestamp + '12 hours';
update dst set tzage = age( tz2 at time zone 'GMT', tz1 at time zone 'GMT' );
select * from dst where tzage <> '12 hrs';
tz1 | tz2 | tzage
------------------------+------------------------+----------
2005-04-03 00:00:00-05 | 2005-04-03 12:00:00-04 | 11:00:00
2005-10-30 00:00:00-04 | 2005-10-30 12:00:00-05 | 13:00:00
2006-04-02 00:00:00-05 | 2006-04-02 12:00:00-04 | 11:00:00
2006-10-29 00:00:00-04 | 2006-10-29 12:00:00-05 | 13:00:00
2007-04-01 00:00:00-05 | 2007-04-01 12:00:00-04 | 11:00:00
2007-10-28 00:00:00-04 | 2007-10-28 12:00:00-05 | 13:00:00
(6 rows)

My query produces the correct results for 2005 and 2006; but in 2007 DST
dates are changing in North America and my query seems to still be using
2006 rules for 2007 data. What can I do about this? Query should report
2007-03-18 and 2007-11-11.

Frank

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Chad Wagner 2007-01-01 20:52:00 Re: 2007 DST change not working
Previous Message Frank Bax 2007-01-01 17:30:07 Re: upgrading from 7.3.5 to 8.1.5