Dear Geoffrey, In login.jsp we generate a html <script> tag, <script src="<%= request.getContextPath()%>/shared/TimezoneFinder.js" defer=1></script>, which references our TimezoneFinder.js file located in /shared under the Mid-Tier web application install directory. Because we're running on the client side we can create a new JavaScript Date object and figure out the timezone on the local client, for example on a PDT(Pacific Daylight Time) PC the timezone is determined by the TimezoneFinder.js file to be America/Dawson, this value is sent to Mid-Tier. As Mid-Tier begins constructing the user's SessionData it performs the following checks:
Does the user logging in have a entry in the AR System User Preferences form? If yes then overwrite the timezone value sent, such as America/Dawson, with whatever value that is found in the preferences form on the Locale tab in the Timezone field. Is there no entry in the AR System User Preference form for this user? If there is not then is there a value from passing through login.jsp/login_common.js and the TimezoneFinder.js file, such as the America/Dawson value? If yes, then use this value as the timezone for the user. If neither of these is true then default to the timezone of the Mid-Tier host machine. Now, once the form starts generating we enter a class in Mid-Tier which is responsible for emitting the file userdata.js and it's contents, in particular the value for var timezoneRules. The file userdata.js is auto generated by Mid-Tier as each user logs in to the system. The variable timezoneRules has a structure containing values which helps the client side code know what offsets should be used when determining the correct display values for AR System Date and Date/Time fields. How is the value for this variable determined? Using the passed in Timezone name determined from one of the above steps, running TimezoneFinder.js or the existence of a AR System User preference entry, Mid-Tier looks in the /resources/standard/javascript/timezone directory for a .js file that it can match up to the passed in timezone name. For example if the passed in value is America/Dawson, Mid-Tier loads America_Dawson.js, inside of which is the var timezoneRule declaration and value, which is put into the generated userdata.js file. Hope this helps, Regards, Roney Samuel Varghese On 5/22/07, Geoffrey Endresen <[EMAIL PROTECTED]> wrote:
** We have a request from our users to show Pacific Timezone on everything instead of the local timezone of the user for a mid-tier application. I want to display the current timezone of the user on the forms after login to show the user what timezone applies to all dates on the form. Any ideas? Thanks, -Geoff Endresen Amazon.com __20060125_______________________This posting was submitted with HTML in it___
_______________________________________________________________________________ UNSUBSCRIBE or access ARSlist Archives at www.arslist.org ARSlist:"Where the Answers Are"