Persistence and database time zone
Database writes
DB2® requires that all time stamps have a time zone offset. If a time stamp does not have an offset, the offset of the integration node run time is applied to it by default. If the database is to be maintained in UTC, it is the responsibility of the mapper to ensure that each time stamp is correct because the time stamp is cast to a GMTTIMESTAMP and the offset from UTC is subtracted before it is inserted into the database.
SET tsTxnTimestamp = Time zone.recastTimestampToBrokerTZ(tsTxnTimestamp, rPMPVars.Channel.TIMEZONE);
Database Reads
The following code shows how a time stamp that is read from the database is converted to the integration node's local time if the DB_TZ is UTC. This code is taken from Actions.UpdateTaskTime.
IF Time zone.GetDB_TZ()='UTC' THEN
SET rParent.UpdTaskTime.INTERVAL_END = Time zone.recastTimestampToBrokerTZ(rParent.UpdTaskTime.INTERVAL_END, 'UTC' );
END IF;