Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Get UTC time

Get UTC time

From: Geld Marcoss <geld1_at_nexus.hu>
Date: Wed, 30 Nov 2005 21:57:16 +0100
Message-ID: <dml3nj$i1a$1@namru.matavnet.hu>


Hello Oracle experts,

I want to store date and time values always in UTC (paying attention to daylight savings) in a DATE filed as a default value. (eg.: MYDATE DATE DEFAULT=???sysdate???)

The problem is that the OS has a timezone settings eg.: Asia/Peking and use always the actual local time (Daylight saving is handled correctly by the OS). And so sysdate gives back a localtime and not UTC time. I know that I can setup a dbtimezone for my database and update the localtime with that value, but don't know how. I mean if I set it to eg.: +09:00 than what happens with daylight saving? I should have the +09:00 in summer and +08:00 in winter but the dbtimezone is always +09:00.

Besides this as I know the string representation for timezones can be different between the Oracle and the OS, isn't it?

Any idea? Received on Wed Nov 30 2005 - 14:57:16 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US