Re: PostgreSQL now() function returns incorrect time - Mailing list pgsql-general

From Giovanni M.
Subject Re: PostgreSQL now() function returns incorrect time
Date
Msg-id 9216699e0511091218t386b9c3aj8a4e84ddc5326bfb@mail.gmail.com
Whole thread Raw
In response to Re: PostgreSQL now() function returns incorrect time  (Michael Fuhr <mike@fuhr.org>)
List pgsql-general
I followed your instructions and now() indeed returned the correct time!
Thanks for your help

 
On 11/9/05, Michael Fuhr <mike@fuhr.org> wrote:
On Wed, Nov 09, 2005 at 02:24:28PM -0200, Giovanni M. wrote:
> I'm situated in Brazil and recently daylights savings/summer time kicked in
> and clocks were set one hour ahead. Now on my windows box the system clock
> automatically adjusted to the correct time. But performing the following
> query on the postgresql-8.0 server i get this result:
>  select now()
> ----------------------
> 2005-11-09 13:22:27.625-03
>  while the actual current time is 14:22h, and being reported correctly in
> the windows system clock
>  I have tried finding some information in the documentation and came across
> locale settings in the postgresql.conf configuration file but Im not sure if
> this is the correct place to be looking. Should i set the timezone property
> in postgresql.conf to something other than unknown?

Do you see the correct time if you do the following?

SET timezone TO 'Brazil/East';
SELECT now();

If so then change the timezone line in postgresql.conf to:

timezone = Brazil/East

Then reload or restart the database.

--
Michael Fuhr



--
A World of KEIGI
http://keigi.blogspot.com

pgsql-general by date:

Previous
From: Brian Mathis
Date:
Subject: Re: libpq version in rpm packages
Next
From: "Andrus"
Date:
Subject: Re: Foreign key reference causes invalid DELETE trigger calls