Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hello,
I have migrated my Talend jobs on remote server. when i run my jobs there, the load timestamp is coming 1 hr behind local time i.e i am getting UTC timestamp instead of local time( which is 1 hr ahead).
In tmap, i am using the logic as:
TalendDate.getCurrentDate()
I do not want to change my code. is there a way i can handle this without making the change in code?Also, its not possible to change the server time :(. Any suggestions
Hi
You can run this Java code to change the timezone on a tJava in the beginning of job.
java.util.TimeZone.setDefault(java.util.TimeZone.getTimeZone("America/Los_Angeles"));
// replace "America/Los_Angeles" to your local timezone
Regards
Shong
@shong: any other solution instead of using tjava? I have no knowledge of java hence wanted to avoid this.
@Shicong Hong : how should my job design look like? Please see the attached job dedesign. it says tJava component needs an input link.
my issue is that there is one field i am maintaining in my target database i.e load_at. it is getting loaded with remote server timezone(UTC) which is 1 hr behind the CET. all other fields are coming correct. how can i handle this. i do not want to change the ETL logic in 150 jobs.