pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: JB@BlackSkyTech.com
Cc: 'Kevin Grittner' <Kevin.Grittner@wicourts.gov>
Cc: pgsql-bugs@postgresql.org
Subject: Re: LOCALTIMESTAMP has wrong time zone
Date: Thu, 24 Feb 2011 18:23:47 -0500
Message-ID: <1430.1298589827@sss.pgh.pa.us> (raw)
In-Reply-To: <000b01cbd474$47e70b50$d7b521f0$@com>
References: <000001cbd468$124cc720$36e65560$@com>
	<4D6681F1020000250003AFED@gw.wicourts.gov>
	<29565.1298586918@sss.pgh.pa.us>
	<000b01cbd474$47e70b50$d7b521f0$@com>

"Jonathan Brinkman" <JB@BlackSkyTech.com> writes:
> postgres@Cloud-DB1:~$ psql beta_cms_main -c "show timezone;"
>  TimeZone
> ----------
>  EST
> (1 row)

Hmmm ... you do realize that that setting will result in EST (GMT-5)
all year round?  It's more likely that you want America/New_York.
That's not your immediate problem, though it might be a problem come
daylight savings time.

> postgres@Cloud-DB1:~$ psql beta_cms_main -c "select now();"
>               now
> -------------------------------
>  2011-02-24 17:42:40.023498-05
> (1 row)

> postgres@Cloud-DB1:~$ psql beta_cms_main -c "select localtimestamp;"
>          timestamp
> ----------------------------
>  2011-02-24 17:42:40.078052
> (1 row)

> All looks correct to me!

Well, that shows that you're getting the correct answer for
localtimestamp in psql, so if your application is getting different
answers, then you need to look into what it is that your application
is doing differently.  Possibly you have some other value of timezone in
force in the application's sessions, or there's some conversion going
on in the client that you haven't told us about.

			regards, tom lane



view thread (9+ messages)  latest in thread

Message-ID: <1430.1298589827@sss.pgh.pa.us>
Permalink:  ../1430.1298589827@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1430.1298589827@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, JB@BlackSkyTech.com, Kevin.Grittner@wicourts.gov
  Subject: Re: LOCALTIMESTAMP has wrong time zone
  In-Reply-To: <1430.1298589827@sss.pgh.pa.us>
  References: <000001cbd468$124cc720$36e65560$@com> <4D6681F1020000250003AFED@gw.wicourts.gov> <29565.1298586918@sss.pgh.pa.us> <000b01cbd474$47e70b50$d7b521f0$@com> <1430.1298589827@sss.pgh.pa.us>

* 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