Re: now() and time zone

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Jean-Christophe Roux <jcxxr(at)yahoo(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: now() and time zone
Date: 2006-10-04 21:06:42
Message-ID: 20061004210642.GF7063@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Oct 04, 2006 at 02:01:18PM -0700, Jean-Christophe Roux wrote:
> Hello,
> I am a bit sorry to come back on that topic but I just cannot get it right. How comes that
> select now() at time zone 'EST'
> returns
> "2006-10-04 15:59:26.713623"
> when it is actually 16:59 on the east coast? Can it be that the server where the PostgreSQL database is located is not properly configured?

Maybe there's summar time/daylight savings time? I'm unsure if "EST" is
supposed to reflect that.

You can say things like:

select now() at time zone 'America/California';

Perhaps that gets you something more reasonable?

Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jean-Christophe Roux 2006-10-04 21:08:29 Re: now() and time zone
Previous Message Jean-Christophe Roux 2006-10-04 21:01:18 now() and time zone