From: | Cedar Cox <cedarc(at)visionforisrael(dot)com> |
---|---|
To: | Grant <grant(at)conprojan(dot)com(dot)au> |
Cc: | Roberto Mello <rmello(at)cc(dot)usu(dot)edu>, pgsql-sql(at)postgresql(dot)org |
Subject: | Re: Timezone conversion |
Date: | 2001-04-24 10:16:11 |
Message-ID: | Pine.LNX.4.21.0104241304580.19858-100000@nanu.visionforisrael.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
>
From | Date | Subject | |
---|---|---|---|
Next Message | Cedar Cox | 2001-04-24 10:57:18 | Re: [SQL] select ... for update in plpgsql |
Previous Message | Ossie J. H. Moore | 2001-04-24 04:31:06 | Re: using top-level aggregate values in subqueries |