Обсуждение: Difference when using ZIC vs. Timezone Abbr - Bug?
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
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
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.
Ah.. my definition of MDT was flawed; thanks for the help!<br /><br /> Alvaro Herrera wrote: <blockquote cite="mid:20080822011725.GX4169@alvh.no-ip.org"type="cite"><pre wrap="">Tom Lane wrote: </pre><blockquote type="cite"><prewrap="">Dave Witt <a class="moz-txt-link-rfc2396E" href="mailto:dwitt@movenetworks.com"><dwitt@movenetworks.com></a>writes: </pre><blockquote type="cite"><pre wrap="">Thesetwo 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'; </pre></blockquote><pre wrap="">Why are yousurprised? Boise would've been on MST not MDT on that date. </pre></blockquote><pre wrap=""> i.e. try using MST7MDT instead, which behaves more sanely. -- Alvaro Herrera <a class="moz-txt-link-freetext" href="http://www.CommandPrompt.com/">http://www.CommandPrompt.com/</a> The PostgreSQL Company - Command Prompt, Inc. </pre></blockquote><br />