Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

UTC and local DATEs

user3631939Jun 11 2010 — edited Jun 14 2010
Hello

I'm having a problem, converting DATE fields (that contain date and time) from UTC to my local time zone. Using "select sessiontimezone, dbtimezone from dual" I found out, that my timezone (Europe/Berlin) is +02:00 (from whatever).

The content of my DATE-field is "6/11/2010 1:57:59 PM" which should return "11.06.2010 15:57:59" (the format doesn't really matter, but note the difference of said 2 houres.

There are many infos on the web regarding this problem, but none worked right for me, I also have to deal with the daylight savings, so the difference is not always 2 houres. I guess, during winter it's only 1 houre.

select some_date, CAST((FROM_TZ(CAST(some_date AS TIMESTAMP), dbtimezone) AT TIME ZONE 'Europe/Berlin') AS DATE) from bla had no effect. It returned the same value as the unthreatened original value.

Thanks for your help
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 12 2010
Added on Jun 11 2010
3 comments
1,905 views