Setting Time Zone in Advanced Formula

The Time Zone field is a required field that must be set by you (the designer).

Note: The system by default will always set the time to 5 PM.

At the time of designing the formula, your time zone (the designer's time zone) will be populated into the Time Zone field. As an example, when the designer is in the process of designing the form and if the user's time zone is set to Pacific Time (US & Canada), then this field will be populated with this time zone, but you can change it to suit the customer's time zone.

This Time Zone field is used only for formula calculation. That is to sate: When an Advanced Formula is using a date function such as 'date diff' with a combination of Date Only Picker and Date Picker, then the Time Zone set in the Formula Definition will be used for calculation.

A tooltip will be provided in the Time Zone field with the following content:

"The Time Zone specified here will be used for any formula calculations involving Date and Date Only Picker fields. In addition, certain Date Functions will also use this value. At runtime, Unifier converts the formula evaluated value to retain the Time Zone of the logged-in user."

Similarly, for date functions such as today(), the time zone specified in the formula definition will be used. At runtime, the logged-in user's time zone will be used for further calculating the resultant value.

In the server, all date objects in Java use the Server time zone, and the code is adjusted to use the user's time zone preference.

Unifier adjusts the time zone of Date Pickers to be set as the server time zone, but does not adjust for the Date-Only picker. Therefore, the result derived from the date difference is adjusted to fit the logged-in user's time zone.

The following scenario provides information about the variety in setting up the time zones options involving date operations (for example formula calculations involving date operations such as 'Date Diff' and 'Date Add'), when the data elements that make up the formula are a Date Picker and a Date-Only Picker.

User A's Time Zone in CA - 2 PM PDT

User B's Time Zone in NY- 5 PM EDT

Server Time Zone in London- 10 PM GMT - Stored in database

For Date Picker fields

When the user A opens the form, the system does the time zone conversion from the server time zone to PDT. In the above example, the time in the server location is 10 PM. The system will deduct 8 hours to adjust to User A's location and set the value as 2 PM PDT.

For Date-Only Pickers fields

Unifier does not do any adjustments, and the time internally is always treated as 12 AM (that is, the time stamp is 00:00). No time stamp is visible to the user.

When a user sees both of these fields, the time stamp is seen as 12:00 AM and 2:00 PM respectively for Date-only. When a 'date diff' is done, the value returned maybe 0 days. When the calculation for date formula is done, the system converts date only picker to have a time stamp of 2:00 PM

Problems could arise based on the time zone when "date difference" kind of operations are performed. The value seen varies depending on the user's preferred time zone.



Last Published Monday, June 3, 2024