Time Zone Settings

This section contains recommendations related to configuration of database connections and usage.

Time Zone Settings

When processing data relating to a different time zone from the local time zone, you may want to use the original time zone for the time information stored.

To store a date object with the attached time zone in the database, set the Execution Context and Platform property mz.use.date.timezone to true. This will instruct the system to use the attached time zone when SQL input originates from a date object.

In most cases, it is sufficient to set the property in the pico configuration of the EC. However, in case of audit processing, you must also set the property in the pico configuration of the Platform.

Example - APL code when inserting date in audit table

This example shows how APL code may look when inserting a date in an audit table using a certain time zone.

dateSetTZ(myDate,"GMT-6");
auditSet("Default.MyAuditProfile","MY_AUDIT_TAB",
"MY_DATE_COLUMN",mydate);

Note!

If the mz.use.date.timezone property is used for setting dates with another time zone, the actual time zone is not stored in the database, and you may have to manually convert the date during selection.

When you store dates in Oracle, you can use the type TIMESTAMP WITH TIME ZONE to keep track of the attached time zone.