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 57FE95E40AC for ; Thu, 26 Aug 2004 12:22:04 -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 95084-08 for ; Thu, 26 Aug 2004 15:22:08 +0000 (GMT) Received: from pop.e-it.com (pop.e-it.com [216.187.113.81]) by svr1.postgresql.org (Postfix) with ESMTP id 74D595E37D0 for ; Thu, 26 Aug 2004 12:21:59 -0300 (ADT) Received: (qmail 1806 invoked by uid 500); 26 Aug 2004 15:22:00 -0000 Received: from ool-18b9d65f.dyn.optonline.net (HELO ?151.191.181.145?) (eric@did-it.com@24.185.214.95) by pop.e-it.com with SMTP; 26 Aug 2004 15:22:00 -0000 Message-ID: <412E001D.7060408@did-it.com> Date: Thu, 26 Aug 2004 11:22:05 -0400 From: Ericson Smith User-Agent: Mozilla Thunderbird 0.7.1 (X11/20040626) X-Accept-Language: en-us, en MIME-Version: 1.0 Cc: pgsql-admin@postgresql.org Subject: Re: Time is off in PG server References: <412DE9EE.1070207@did-it.com> <17738.1093532734@sss.pgh.pa.us> In-Reply-To: <17738.1093532734@sss.pgh.pa.us> Content-Type: multipart/mixed; boundary="------------070800060905050204050409" 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/264 X-Sequence-Number: 14659 This is a multi-part message in MIME format. --------------070800060905050204050409 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Tom Lane wrote: >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 > > I realized I made a mistake in that initial email (should have said 12am instead of pm). However, I tried: > set local time zone 'EST5EDT'; SET > select now(); now ------------------------------- 2004-08-26 10:17:45.472901-05 [root@pg data]# date Thu Aug 26 11:21:01 EDT 2004 - Ericson --------------070800060905050204050409 Content-Type: text/x-vcard; charset=utf-8; name="eric.vcf" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="eric.vcf" begin:vcard fn:Ericson Smith n:Smith;Ericson org:Did-it.com;Programming adr:#304;;55 Maple Avenue;Rockville Center;NY;11570;USA email;internet:eric@did-it.com title:Web Developer tel;work:516-255-0500 tel;cell:646-483-3420 note:Nothing special! x-mozilla-html:FALSE url:http://www.did-it.com version:2.1 end:vcard --------------070800060905050204050409--