Skip site navigation (1) Skip section navigation (2)

Re: Time is off in PG server

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ericson Smith <eric(at)did-it(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Time is off in PG server
Date: 2004-08-26 15:05:34
Message-ID: 17738.1093532734@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-admin
Ericson Smith <eric(at)did-it(dot)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

In response to

Responses

pgsql-admin by date

Next:From: Ericson SmithDate: 2004-08-26 15:22:05
Subject: Re: Time is off in PG server
Previous:From: Tom LaneDate: 2004-08-26 14:51:21
Subject: Re: Odd double queries continues

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group