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
|