DST question

Lists: pgsql-novice
From: "Wright, George" <George(dot)Wright(at)infimatic(dot)com>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: DST question
Date: 2007-10-01 17:19:47
Message-ID: 51548D6D5BEB57468163194A8C1A0E983193D7@MAGPTCPEXC02.na.mag-ias.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-novice

I am trying to get Daylight Savings Time working for the EAST Brazilian
time zone. In Brazil for 2007, the DST change occurs on Oct. 13-14.

I tried setting the DB to each of the following time zones with the
statement: SET SESSION TIME ZONE <TZ>;

Where <TZ> was one of the following:

'America/Sao_Paulo Brazil/East';

'EBST3EBDT';

'BRT'

The DST switch appears to happen on 10/28/2007 between the hours of 1am
and 2am with all 3 of those strings.

The output of select version(); is:

PostgreSQL 8.1.5 on x86_64-unknown-linux-gnu, compiled by GCC gcc (GCC)
4.1.2 20061115 (prerelease) (SUSE Linux)

O/S is Suse 10.2

How do I get the proper DST for East Brazil to work?

Thanks.


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Wright, George" <George(dot)Wright(at)infimatic(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: DST question
Date: 2007-10-01 18:09:47
Message-ID: 19209.1191262187@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-novice

"Wright, George" <George(dot)Wright(at)infimatic(dot)com> writes:
> I am trying to get Daylight Savings Time working for the EAST Brazilian
> time zone. In Brazil for 2007, the DST change occurs on Oct. 13-14.

You need a newer version of the zic timezone database. Way newer --- it
looks to me like the first version of the zic files that knows the above
rules is 2007h, which was released today. You'd need to grab
ftp://elsie.nci.nih.gov/pub/tzdata2007h.tar.gz, feed it through zic,
and put the files into place in the Postgres installation tree.

<rant>
Suggestion: lobby your politicians to set DST transition dates more than
just a month in advance. Or even (heaven forbid) have a law that stays
the same for years at a time. Don't they realize that people have
better things to do than scramble to update their equipment at the last
minute?
</rant>

regards, tom lane


From: "Wright, George" <George(dot)Wright(at)infimatic(dot)com>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: Re: DST question
Date: 2007-10-01 21:37:57
Message-ID: 51548D6D5BEB57468163194A8C1A0E983193D9@MAGPTCPEXC02.na.mag-ias.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-novice

I downloaded the archive and extracted the files, and ran zic on them
(southamerica in particular)

When I execute zdump Brazil/East I see the following:

Brazil/East Sun Oct 21 02:59:59 2029 UTC = Sat Oct 20 23:59:59 2029 BRT
isdst=0 gmtoff=-10800
Brazil/East Sun Oct 21 03:00:00 2029 UTC = Sun Oct 21 01:00:00 2029
BRST isdst=1 gmtoff=-7200

These appear to be the old rules. I'm not sure what I did wrong. I
rebooted PostGreSQL and the box just in case but still see the old
values.

Any ideas?

-----Original Message-----
From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
Sent: Monday, October 01, 2007 2:10 PM
To: Wright, George
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: [NOVICE] DST question

"Wright, George" <George(dot)Wright(at)infimatic(dot)com> writes:
> I am trying to get Daylight Savings Time working for the EAST
Brazilian
> time zone. In Brazil for 2007, the DST change occurs on Oct. 13-14.

You need a newer version of the zic timezone database. Way newer --- it
looks to me like the first version of the zic files that knows the above
rules is 2007h, which was released today. You'd need to grab
ftp://elsie.nci.nih.gov/pub/tzdata2007h.tar.gz, feed it through zic,
and put the files into place in the Postgres installation tree.

<rant>
Suggestion: lobby your politicians to set DST transition dates more than
just a month in advance. Or even (heaven forbid) have a law that stays
the same for years at a time. Don't they realize that people have
better things to do than scramble to update their equipment at the last
minute?
</rant>

regards, tom lane


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Wright, George" <George(dot)Wright(at)infimatic(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: DST question
Date: 2007-10-01 23:08:22
Message-ID: 23960.1191280102@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-novice

"Wright, George" <George(dot)Wright(at)infimatic(dot)com> writes:
> I downloaded the archive and extracted the files, and ran zic on them
> (southamerica in particular)

> When I execute zdump Brazil/East I see the following:

> Brazil/East Sun Oct 21 02:59:59 2029 UTC =3D Sat Oct 20 23:59:59 2029 BRT
> isdst=3D0 gmtoff=3D-10800
> Brazil/East Sun Oct 21 03:00:00 2029 UTC =3D Sun Oct 21 01:00:00 2029
> BRST isdst=3D1 gmtoff=3D-7200

> These appear to be the old rules. I'm not sure what I did wrong. I
> rebooted PostGreSQL and the box just in case but still see the old
> values.=20

Did you put the files in the right place?

zdump probably looks at /usr/share/zoneinfo (or local equivalent)
by default. Postgres looks in $sharedir/timezone, where
"pg_config --sharedir" will tell you what $sharedir is. You'll
probably need to update both of those directory trees and reboot
before everything in the system will notice the new rules.

regards, tom lane


From: "Wright, George" <George(dot)Wright(at)infimatic(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-novice(at)postgresql(dot)org>
Subject: Re: DST question
Date: 2007-10-02 14:25:30
Message-ID: 51548D6D5BEB57468163194A8C1A0E983193DC@MAGPTCPEXC02.na.mag-ias.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-novice

Thank you so much! It did work when I got the directories correct.

-----Original Message-----
From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
Sent: Monday, October 01, 2007 7:08 PM
To: Wright, George
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: [NOVICE] DST question

"Wright, George" <George(dot)Wright(at)infimatic(dot)com> writes:
> I downloaded the archive and extracted the files, and ran zic on them
> (southamerica in particular)

> When I execute zdump Brazil/East I see the following:

> Brazil/East Sun Oct 21 02:59:59 2029 UTC =3D Sat Oct 20 23:59:59 2029
BRT
> isdst=3D0 gmtoff=3D-10800
> Brazil/East Sun Oct 21 03:00:00 2029 UTC =3D Sun Oct 21 01:00:00 2029
> BRST isdst=3D1 gmtoff=3D-7200

> These appear to be the old rules. I'm not sure what I did wrong. I
> rebooted PostGreSQL and the box just in case but still see the old
> values.=20

Did you put the files in the right place?

zdump probably looks at /usr/share/zoneinfo (or local equivalent)
by default. Postgres looks in $sharedir/timezone, where
"pg_config --sharedir" will tell you what $sharedir is. You'll
probably need to update both of those directory trees and reboot
before everything in the system will notice the new rules.

regards, tom lane