Re: Timezone conversion - Mailing list pgsql-sql

From Cedar Cox
Subject Re: Timezone conversion
Date
Msg-id Pine.LNX.4.21.0104241304580.19858-100000@nanu.visionforisrael.com
Whole thread Raw
In response to Re: Timezone conversion  (Grant <grant@conprojan.com.au>)
Responses RE: Timezone conversion
List pgsql-sql
Umm.. define 'it'.  (Isn't current_timestamp or now() already a
timestamp?)

select CURRENT_TIMESTAMP, CURRENT_TIMESTAMP-2*3600;      timestamp        |  ?column?  
------------------------+------------2001-04-24 13:06:11+03 | 1981-08-07

I also have a question.. How, for example, would I add 90 days to the
current timestamp?

Thanks,
-Cedar


On Thu, 19 Apr 2001, Grant wrote:

> Convert it to timestamp and minus TIMEZONE * 3600...
> 
> On Wed, 11 Apr 2001, Roberto Mello wrote:
> 
> >     Hi,
> > 
> >     How can I do timezone conversions in PG? I looked on the docs and
> > couldn't find how. I want to find the current time in another timezone.
> > 
> >     Thanks,
> > 
> >     -Roberto
> > 
> > P.S: This type of function would be excellent on the cookbook
> > (www.brasileiro.net).
> > 
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
> 
> http://www.postgresql.org/search.mpl
> 



pgsql-sql by date:

Previous
From: Cedar Cox
Date:
Subject: Re: select ... for update in plpgsql
Next
From: "Francis Solomon"
Date:
Subject: RE: Timezone conversion