Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Get UTC time
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
![]() |
![]() |