pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jonathan Brinkman <JB@BlackSkyTech.com>
To: pgsql-bugs@postgresql.org
Subject: TO_CHAR(timestamptz,datetimeformat) wrong after DST change
Date: Fri, 18 Mar 2011 10:55:03 -0400
Message-ID: <004c01cbe57c$7d920ca0$78b625e0$@com> (raw)

My TO_CHAR function is now an hour off thanks to Daylight Savings Time. 
The dates are correct (I'm in EST: TZ=-04) but my function now returns TIME
an hour early.
(prior to DST we were TZ=-05).

TIMESTAMPTZ data (v_dt): 2011-03-17 18:21:50-04
FUNCTION SNIPPET: to_char(v_dt, 'mm/dd/yyyy hh:mi AM')
FUNCTION RETURNS: 03/18/2011 09:21 AM
FUNCTION SHOULD RETURN: 03/18/2011 10:21 AM

postgres=# show time zone;
     TimeZone
------------------
 America/New_York
(1 row)





view thread (10+ messages)  latest in thread

Message-ID: <004c01cbe57c$7d920ca0$78b625e0$@com>
Permalink:  ../004c01cbe57c$7d920ca0$78b625e0$@com/
Also on:    postgresql.org/message-id/004c01cbe57c$7d920ca0$78b625e0$@com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: JB@BlackSkyTech.com
  Subject: Re: TO_CHAR(timestamptz,datetimeformat) wrong after DST change
  In-Reply-To: <004c01cbe57c$7d920ca0$78b625e0$@com>
  References: <004c01cbe57c$7d920ca0$78b625e0$@com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox