Re: to_char(now(), 'YYYY') and time zones

From: Alessio Bragadini <alessio(at)albourne(dot)com>
To: Simon Bæk Carstensen <simonbc(at)email(dot)com>
Subject: Re: to_char(now(), 'YYYY') and time zones
Date: 2001-04-12 14:03:42
Message-ID: 3AD5B5BE.3D875E70@albourne.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Simon Bæk Carstensen wrote:

> I guess I need a combination of the 2 queries above - one that asks for
> ONLY the year in a certain time zone (fx UTC or CET).

The easiest way is to do

SET TimeZone TO 'CET';

[from now on all timestamps will be returned CET-base]

SELECT ...

You can then

SET TimeZone TO DEFAULT;

or wait for the end of the connection.

--
Alessio F. Bragadini alessio(at)albourne(dot)com
APL Financial Services http://village.albourne.com
Nicosia, Cyprus phone: +357-2-755750

"It is more complicated than you think"
-- The Eighth Networking Truth from RFC 1925

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Michael Ansley 2001-04-12 14:27:38 RE: to_char(now(), 'YYYY') and time zones
Previous Message chris markiewicz 2001-04-12 13:35:50 RE: fastpath error?