converting timstamptz to local time zone

From: Peter Nixonn <listuser(at)peternixon(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: converting timstamptz to local time zone
Date: 2006-03-30 11:24:55
Message-ID: e0gf74$fju$1@sea.gmane.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

How can I "select ('2006-01-01 9:00:00+02' at time zone 'GMT')::timestamp;"
where instead of GMT it has the local time zone of the machine I am running
it on (which varies between my machines)?
I dont want to hard code the timezone of the machine into the query.. I want
to pick it up from the environment, but cant figure out how :-(

--

Peter Nixon
http://www.peternixon.net/
PGP Key: http://www.peternixon.net/public.asc

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Sergey Karin 2006-03-30 11:25:51 Re: How to detect primary key of a table
Previous Message Sergey Karin 2006-03-30 11:13:12 How to detect primary key of a table