From: | Joshua Moore-Oliva <josh(at)chatgris(dot)com> |
---|---|
To: | Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | now() AT TIME ZONE interval '-5 hours' returns type interval??? |
Date: | 2003-03-14 01:37:47 |
Message-ID: | 200303132037.47678.josh@chatgris.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
I am attempting to work with time zones. All of my timestamp fields are
timestamp with time zone
The problem I am having is when I attempt to convert a timestamp with a time
zone to another time zone. For example, the statement
SELECT now() AT TIME ZONE interval '-5 hours'
returns type interval not timestamp with//out time zone.
On my website I have people select the timezone they are in..
That way I can theoritically perform an insert along the lines of
timestamp '2003-12-03 19:34' AT TIME ZONE interval '-5 hours'
replacing -5 with whatever timezone they specify.
I am hoping to be able to do the reverse,
SELECT stamp AT TIME ZONE interval '-5 hours' FROM table;
However it returns type interval!!! And casting it to type timestamp does not
work.
Help!
Josh.
From | Date | Subject | |
---|---|---|---|
Next Message | Joshua Moore-Oliva | 2003-03-14 01:45:53 | Re: now() AT TIME ZONE interval '-5 hours' returns type interval??? -- more info, looks like a postgres bug |
Previous Message | Partho Bhowmick | 2003-03-14 01:27:54 | Regular expressions in PostgreSQL |