pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ericson Smith <eric@did-it.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Time is off in PG server
Date: Thu, 26 Aug 2004 11:22:05 -0400
Message-ID: <412E001D.7060408@did-it.com> (raw)
In-Reply-To: <17738.1093532734@sss.pgh.pa.us>
References: <412DE9EE.1070207@did-it.com>
	<17738.1093532734@sss.pgh.pa.us>

Tom Lane wrote:

>Ericson Smith <eric@did-it.com> 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

Attachments:

eric.vcf (text/x-vcard, 313B) download 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

view thread (6+ messages)  latest in thread

Message-ID: <412E001D.7060408@did-it.com>
Permalink:  ../412E001D.7060408@did-it.com/
Also on:    postgresql.org/message-id/412E001D.7060408@did-it.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-admin@postgresql.org
  Cc: eric@did-it.com
  Subject: Re: Time is off in PG server
  In-Reply-To: <412E001D.7060408@did-it.com>
  References: <412DE9EE.1070207@did-it.com> <17738.1093532734@sss.pgh.pa.us> <412E001D.7060408@did-it.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