A Talend Job that runs on a JobServer fetches the incorrect time zone when using TalendDate.getCurrentDate

Problem Description

In some Jobs, the Talend function TalendDate.getCurrentDate is used to get the current timestamp. When initiating the Jobs from TAC, the function returns the date with the GMT time zone. However, in this example the JobServer machine time zone is set to IST by default.

 

Root Cause

When using the date command, the value returned is the date in IST on the JobServer machine. However, the JobServer is not picking up the date from the current date—instead it picks up the date from the environment variable TZ.

 

Solution

Set the environment variable TZ='Asia/Kolkata' and restart TAC/JobServer to fix the issue.

 

Note: The job server is installed on a Linux machine.

Version history
Revision #:
3 of 3
Last update:
‎07-03-2018 03:53 PM
Updated by:
 
Contributors