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

Re: TO_CHAR(timestamptz,datetimeformat) wrong after DST change

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: JB(at)BlackSkyTech(dot)com, pgsql-bugs(at)postgresql(dot)org
Subject: Re: TO_CHAR(timestamptz,datetimeformat) wrong after DST change
Date: 2011-03-18 16:46:53
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
"Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov> writes:
> "Jonathan Brinkman" <JB(at)BlackSkyTech(dot)com> wrote:
>> I guess EST is not DST-friendly?
> EST stands for Eastern *Standard* Time, which is explicitly *not*
> under Daylight Saving Time.

Right.  SET TIMEZONE 'EST' gets you GMT-5 all year round.
For background see this bit in src/timezone/data/northamerica:

# From Arthur David Olson, 2005-12-19
# We generate the files specified below to guard against old files with
# obsolete information being left in the time zone binary directory.
# We limit the list to names that have appeared in previous versions of
# this time zone package.
# We do these as separate Zones rather than as Links to avoid problems if
# a particular place changes whether it observes DST.
# We put these specifications here in the northamerica file both to
# increase the chances that they'll actually get compiled and to
# avoid the need to duplicate the US rules in another file.

Zone	EST		 -5:00	-	EST
Zone	MST		 -7:00	-	MST
Zone	HST		-10:00	-	HST
Zone	EST5EDT		 -5:00	US	E%sT
Zone	CST6CDT		 -6:00	US	C%sT
Zone	MST7MDT		 -7:00	US	M%sT
Zone	PST8PDT		 -8:00	US	P%sT

(Note: the lack of a RULES entry means no DST rule.)

			regards, tom lane

In response to


pgsql-bugs by date

Next:From: Robert HaasDate: 2011-03-19 02:12:58
Subject: Re: Problem with ALTER TABLE - occasional "tuple concurrently updated"
Previous:From: Kevin GrittnerDate: 2011-03-18 16:33:54
Subject: Re: TO_CHAR(timestamptz,datetimeformat) wrong after DST change

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group