X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id DC35B5E46EE for ; Thu, 26 Aug 2004 12:05:31 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 88857-10 for ; Thu, 26 Aug 2004 15:05:36 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 1488D5E46DC for ; Thu, 26 Aug 2004 12:05:28 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.11/8.12.11) with ESMTP id i7QF5YZY017739; Thu, 26 Aug 2004 11:05:34 -0400 (EDT) To: Ericson Smith Cc: pgsql-admin@postgresql.org Subject: Re: Time is off in PG server In-reply-to: <412DE9EE.1070207@did-it.com> References: <412DE9EE.1070207@did-it.com> Comments: In-reply-to Ericson Smith message dated "Thu, 26 Aug 2004 09:47:26 -0400" Date: Thu, 26 Aug 2004 11:05:34 -0400 Message-ID: <17738.1093532734@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200408/263 X-Sequence-Number: 14658 Ericson Smith writes: > When using date oriented functions on Postgresql, the time is an hour > off, or in certain times, one hour ahead. > System Timezone: EST > System Time (date command): Thu Aug 26 09:44:28 EDT 2004 > SELECT now(); : 2004-08-26 08:44:31.307343-05 > SELECT date_part('epoch', '2004-08-26'::timestamp) ; : 1093496400 (1am > on that day -- should be 12pm) Looks exactly right to me. 1093496400 corresponds to 1AM EDT, or midnight EST, and after all you do have the timezone set to EST. Possibly you want the zone set to EST5EDT instead. regards, tom lane