How to insert dates relative to the UTC time zone with tOracleOuput component

Question

When inserting a date into an Oracle Database with the tOracleOutput component, by default the date is set to the local time zone where the Job is executed. How can I change the time zone to UTC in an Oracle Database?

 

Answer

To have a local date relative to a time zone, configure the user.timezone property.

 

In this example, set the UTC time zone in one of the following ways:

  • Start the JVM used by the Job with the following command:
    -Duser.timezone=GMT

    For example, java -Duser.timezone=GMT ...

Or:

  • Within the Job, set the user.timezone property in a tJava component as follows:
    java.util.TimeZone.setDefault(java.util.TimeZone.getTimeZone("GMT")) ;

So, when inserting a date with the Oracle JDBC driver, dates are inserted with the UTC time zone.

Version history
Revision #:
10 of 10
Last update:
‎04-04-2019 01:28 AM
Updated by: