Re: How do I convert a timestamp with time zone to local time? - Mailing list pgsql-general

From Valter Douglas Lisbôa Jr.
Subject Re: How do I convert a timestamp with time zone to local time?
Date
Msg-id 200807291536.23813.douglas@trenix.com.br
Whole thread Raw
In response to How do I convert a timestamp with time zone to local time?  ("Rob Richardson" <Rob.Richardson@rad-con.com>)
Responses Re: How do I convert a timestamp with time zone to local time?
List pgsql-general
On Tuesday 29 July 2008 15:07:46 Rob Richardson wrote:
> Greetings!
>
> What is the best way to convert a time expressed as a timestamp with
> time zone into a timestamp in the local time zone without knowing what
> the local time zone is?
>
> Thank you.
>
> RobR
SELECT extract (epoch from your_time_field) from your_table;
SELECT to_timestamp(your_epoch_field) from your_table;

--
Valter Douglas Lisbôa Jr.
Sócio-Diretor
Trenix - IT Solutions
"Nossas Idéias, suas Soluções!"
www.trenix.com.br
contato@trenix.com.br
Tel. +55 19 3402.2957
Cel. +55 19 9183.4244

pgsql-general by date:

Previous
From: "Rob Richardson"
Date:
Subject: How do I convert a timestamp with time zone to local time?
Next
From: Alan Hodgson
Date:
Subject: Re: Index creation and maintenance_work_mem