Re: timezone conversions?

From: steph <stephan0h_at_yahoo.de>
Date: Tue, 10 Mar 2009 09:33:07 -0700 (PDT)
Message-ID: <52c54a97-1970-41ec-a332-db3ca1887316_at_s36g2000vbp.googlegroups.com>



On 10 Mrz., 17:10, "Michel Cadot" <micadot{at}altern{dot}org> wrote:
> "steph" <stepha..._at_yahoo.de> a écrit dans le message de news: f86e6848-4c33-47ed-bb01-4873b8e40..._at_41g2000yqf.googlegroups.com...
> | hello group,
> |
> | What's the easiest/preferred way to programmatically convert a
> | timestamp value from one timezone to another? (i.e. subtract/add the
> | necessary number of hours). I checked the documentation but
> | unfortunately missed any one function to switch timezones.
> |
> | thanks,
> | stephan
>
> Maybe NEW_TIME function.http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/functi...
>
> Regards
> Michel

Hello,

Tried it already: "select new_time(sysdate,'CDT','GMT') from dual" works whereas "select new_time(sysdate,'CET','GMT') from dual" does not because new_time() apparently only knows a very restricted set of timezones.

But I found out myself now:

SELECT FROM_TZ(CAST(sysdate AS TIMESTAMP), dbtimezone) AT TIME ZONE 'GMT' FROM DUAL; The expression "AT TIME ZONE" puzzles me a little - but maybe I should dive a bit more into the timestamp concepts.

thanks anyways,
stephan Received on Tue Mar 10 2009 - 11:33:07 CDT

Original text of this message