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: LOCALTIMESTAMP has wrong time zone
Date: Thu, 24 Feb 2011 16:16:10 -0500
Message-ID: <000001cbd468$124cc720$36e65560$@com> (raw)

Greetings
I'm in Florida (Eastern Time Zone / New York), using Ubuntu 10.04LTS /
Postgresql 8.4.7.

My default timestamps in my database all are +5 hours in the future
(probably GMT), unless I code the 'EST' time zone into the field's default
(timezone('EST'::text, now())).If I use now() it is +5 hours, and if I use
LOCALTIMESTAMP my SQL editor (EMS Postgresql Mgr) changes it to:
'now'::text::timestamp without time zone, which is also +5 hours.

Anywhere I use LOCALTIMESTAMP in my functions, it is shifted +5 hours in the
future. I must use timezone('EST'::text, now()) everywhere, rather than
CURRENT_TIMESTAMP or LOCALTIMESTAMP. Major pain!!

When I type date in Ubuntu Command line, I see correctly: Thu Feb 24
16:13:13 EST 2011
When I run dpkg-reconfigure tzdata, the linux time zone is correct: America
/ New York.

I've set postgresql.conf -->  time zone = 'America/New York'

I've used:
psql beta_main -c "SET TIME ZONE EST;"
psql beta_main -c "SHOW TIME ZONE;"

I've even reinstalled the Database from another server (where this is NOT
happening!) after setting above stuff, and restarted postgresql, same
results.




view thread (9+ messages)  latest in thread

Message-ID: <000001cbd468$124cc720$36e65560$@com>
Permalink:  ../000001cbd468$124cc720$36e65560$@com/
Also on:    postgresql.org/message-id/000001cbd468$124cc720$36e65560$@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: LOCALTIMESTAMP has wrong time zone
  In-Reply-To: <000001cbd468$124cc720$36e65560$@com>
  References: <000001cbd468$124cc720$36e65560$@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