Difference when using ZIC vs. Timezone Abbr - Bug?

Started by Dave Wittover 17 years ago4 messageshackers
Jump to latest
#1Dave Witt
dwitt@movenetworks.com

These two queries produce different output, using version 8.3.3:

SELECT '2008-01-01 00:00:00+00'::timestamptz AT TIME ZONE 'MDT';

SELECT '2008-01-01 00:00:00+00'::timestamptz AT TIME ZONE 'America/Boise';

..is this a bug?

Note: "America/Boise"="MDT" (from pg_timezone_names)

Best regards,

--
Dave Witt

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Dave Witt (#1)
Re: Difference when using ZIC vs. Timezone Abbr - Bug?

Dave Witt <dwitt@movenetworks.com> writes:

These two queries produce different output, using version 8.3.3:
SELECT '2008-01-01 00:00:00+00'::timestamptz AT TIME ZONE 'MDT';
SELECT '2008-01-01 00:00:00+00'::timestamptz AT TIME ZONE 'America/Boise';

Why are you surprised? Boise would've been on MST not MDT on that date.

regards, tom lane

#3Alvaro Herrera
alvherre@2ndquadrant.com
In reply to: Tom Lane (#2)
Re: Difference when using ZIC vs. Timezone Abbr - Bug?

Tom Lane wrote:

Dave Witt <dwitt@movenetworks.com> writes:

These two queries produce different output, using version 8.3.3:
SELECT '2008-01-01 00:00:00+00'::timestamptz AT TIME ZONE 'MDT';
SELECT '2008-01-01 00:00:00+00'::timestamptz AT TIME ZONE 'America/Boise';

Why are you surprised? Boise would've been on MST not MDT on that date.

i.e. try using MST7MDT instead, which behaves more sanely.

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

#4Dave Witt
dwitt@movenetworks.com
In reply to: Alvaro Herrera (#3)
Re: Difference when using ZIC vs. Timezone Abbr - Bug? - SOLVED

Ah.. my definition of MDT was flawed; thanks for the help!

Alvaro Herrera wrote:

Show quoted text

Tom Lane wrote:

Dave Witt <dwitt@movenetworks.com> writes:

These two queries produce different output, using version 8.3.3:
SELECT '2008-01-01 00:00:00+00'::timestamptz AT TIME ZONE 'MDT';
SELECT '2008-01-01 00:00:00+00'::timestamptz AT TIME ZONE 'America/Boise';

Why are you surprised? Boise would've been on MST not MDT on that date.

i.e. try using MST7MDT instead, which behaves more sanely.

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.