Re: How do I convert a timestamp with time zone to local time?

From: "Valter Douglas Lisbôa Jr(dot)" <douglas(at)trenix(dot)com(dot)br>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: How do I convert a timestamp with time zone to local time?
Date: 2008-07-29 18:36:23
Message-ID: 200807291536.23813.douglas@trenix.com.br
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)trenix(dot)com(dot)br
Tel. +55 19 3402.2957
Cel. +55 19 9183.4244

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alan Hodgson 2008-07-29 18:53:26 Re: Index creation and maintenance_work_mem
Previous Message Rob Richardson 2008-07-29 18:07:46 How do I convert a timestamp with time zone to local time?