dbTalk Databases Forums  

Help with Date Conversion to Session Timezone

comp.databases.oracle comp.databases.oracle


Discuss Help with Date Conversion to Session Timezone in the comp.databases.oracle forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
MartyL
 
Posts: n/a

Default Help with Date Conversion to Session Timezone - 11-01-2006 , 09:15 AM






I have an application that is used by users across the country. It reads
from a table in a centrally located database. It needs to convert a
standard date in the table to the timezone of the user.

I initially wrote a function, TO_STZ to convert a date to the
sessiontimezone:

RETURN
arg_date(+(to_number(substr(dbtimezone,2,2))-to_number(substr(sessiontimezone,2,2)/24

when the user issues the statement SELECT TO_STZ(date_field) from TABLE
the date in the table was converted.

This worked fine up until Daylight Saving Time - at which point sessiontime
changed by -1 hour but dbtimezone stayed the same (I didn't realize at the
time that it was a constant offset from GMT)

Any suggestions on a function that does what I want?

Thanks, Marty



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.