James G Wilkinson <jgw@alpinegeophysics.com> writes:
> I hope that this is some silly beginner's mistake. I have spent quite a bit of
> time
> reading the PostgreSQL documentation and cannot find my error. I have also
> scanned the PostgreSQL archive and the web for help, but I have not found
> anything
> to get me over the hump (it is probably out there, I just cannot find it).
>
> All I am trying to do is convert GMT dates and times to an arbitrary
> time zone. Here is my small test database:
I think the closest thing to what you're trying to do is:
slo=> set timezone = 'GMT';
SET
slo=> select '2001-01-01'::date::timestamptz at time zone 'EST' ; timezone
---------------------2000-12-31 19:00:00
(1 row)
Why are you not just storing a "timestamp with timezone" with the actual time
of the event, and a second column with the local time zone in which you can
choose to use to display the time?
--
greg