Skip to Main Content

Oracle Database Discussions

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!

Oracle TimeZones and Daylight savings time

835308Mar 12 2013 — edited Mar 12 2013
Hi,

I am working on converting a bunch of old data to a new system. I ran a couple of validation reports for the end user to verify, it seems the times were off. I am in the EST but it seems the times in the db were stored as UTC.
So when you convert the time from UTC to EST you need to subtract 5 hours but when it is DST you only subtract 4.

I need to know how to figure out if a time was entered in DST or EST and then I can use something like a decode to decide how much to subtract.

DST Rules:
Stone Age -- 2006 First Sunday in April ,Last Sunday in October
2007 -- present DST Begins 2 a.m. (Second Sunday in March) DST Ends 2 a.m. (First Sunday in November)


Here is part of my select statment:
to_date(to_char(asgn.start_date-5/24,'DD-MON-YYYY')) effective_from,

I looked at Ask Tom and other sites but could not find a good working example that didn't have a hard coded date. Maybe it is not possible in a select statement.

Thanks so much for any help you can provide !!!! :)
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 9 2013
Added on Mar 12 2013
7 comments
1,030 views