Re: Time is off in PG server

From: Ericson Smith <eric(at)did-it(dot)com>
To:
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Time is off in PG server
Date: 2004-08-26 15:22:05
Message-ID: 412E001D.7060408@did-it.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Tom Lane wrote:

>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
>
>
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(at)pg data]# date
Thu Aug 26 11:21:01 EDT 2004

- Ericson

Attachment Content-Type Size
eric.vcf text/x-vcard 315 bytes

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2004-08-26 15:31:52 Re: Time is off in PG server
Previous Message Tom Lane 2004-08-26 15:05:34 Re: Time is off in PG server