Dive into Oracle ADF

Send me a mail
 Dive into Oracle ADF   Click to see the XML version of this web page.   (Updated: 2/3/2008; 9:23:40 PM.)
Tips and tricks from Steve Muench on Oracle ADF Framework and JDeveloper IDE

Search blog with Google:
 

Search BC4J JavaDoc:
 

January 2008
Sun Mon Tue Wed Thu Fri Sat
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31    
Dec   Feb

Get Firefox!

Wednesday, January 30, 2008

I just had a play in the 11g Technology Preview 3 release with our new support for TIMESTAMP WITH LOCAL TIMEZONE datatype. I created a table in a database at Oracle HQ in California called MEETINGS with a column named START_TIME of type TIMESTAMP WITH LOCAL TIMEZONE. From the ADF BC Tester running on my laptop in my home office, I inserted a meeting into the table with a start time of "29-JAN-2008 22:00:00" (i.e. 10pm CET). Using remote desktop, I used a machine in California to start a SQL*Plus window and query the table, and verified that the meeting row showed a START_TIME of 13:00:00 (i.e. 1pm PST). No code necessary. Should turn out to be a very useful feature for apps used by end-users in different timezones that need to be sure to correctly interpret time values in their own local timezone. We also now support the TIMESTAMP WITH TIMEZONE type as well, but the local timezone variant was the one I wanted to see to believe!

You can configure your ADF application's META-INF/adf-config.xml file to contain an XML fragment like this:

<user-time-zone-config xmlns="http://xmlns.oracle.com/adf/usertimezone/config">
<user-timezone expression= "YOUR EL EXPRESSION HERE" />
</user-time-zone-config>

And that EL expression will be evaluated to determine the timezone of the current user, otherwise it defaults to the timezone of the JavaVM. Of course, for testing you can provide an EL expression that is a constant timezone name.


12:40:35 AM    



© Copyright 2008 Steve Muench.