Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 4B1421337BB0 for ; Thu, 24 Feb 2011 19:23:56 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 79468-06 for ; Thu, 24 Feb 2011 23:23:49 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id AA0BD1337BA8 for ; Thu, 24 Feb 2011 19:23:48 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p1ONNlhx001431; Thu, 24 Feb 2011 18:23:47 -0500 (EST) To: JB@BlackSkyTech.com cc: "'Kevin Grittner'" , pgsql-bugs@postgresql.org Subject: Re: LOCALTIMESTAMP has wrong time zone 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> Comments: In-reply-to "Jonathan Brinkman" message dated "Thu, 24 Feb 2011 17:43:38 -0500" Date: Thu, 24 Feb 2011 18:23:47 -0500 Message-ID: <1430.1298589827@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201102/211 X-Sequence-Number: 29483 "Jonathan Brinkman" 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