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

Search Discussions

  • Tom Lane at Aug 22, 2008 at 1:06 am

    Dave Witt 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
  • Alvaro Herrera at Aug 22, 2008 at 1:34 am

    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.
  • Dave Witt at Aug 22, 2008 at 3:29 pm
    Ah.. my definition of MDT was flawed; thanks for the help!

    Alvaro Herrera wrote:
    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.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppgsql-hackers @
categoriespostgresql
postedAug 21, '08 at 9:47p
activeAug 22, '08 at 3:29p
posts4
users3
websitepostgresql.org...
irc#postgresql

People

Translate

site design / logo © 2021 Grokbase