Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
WWong1683187644
Contributor III
Contributor III

Incorrect SQL time retrieved

Hi All,

I am facing a weird issue, but i have no idea what should i check to fix the problem.

I am using Talend job to execute the store procedure in Redshift together with a parameter getdate(),

But the result comes out is not in the Redshift timezone, it is GMT+0 instead.

I notice that difference when i run the select getdate() in redshift directly, in my case is GMT+8.

My question here is how come the result from talend and redshift can be different?

It looks fine to me, no code or advance setting that purposely change the timezone, is there anything else i can check to solve this problem?

Labels (3)
1 Solution

Accepted Solutions
WWong1683187644
Contributor III
Contributor III
Author

I found the root cause already, it is depending on the driver version of the redshift connection component.

V1 will give the datetime in GMT+0,

V2 will give the datetime in the server timezone

 

I also find this info online for your reference:

https://repost.aws/questions/QUzxhtdeEJSqKlrnHMilbIew/redshift-jdbc-driver-getdate-returns-time-in-server-time-zone-instead-of-in-utcd

View solution in original post

1 Reply
WWong1683187644
Contributor III
Contributor III
Author

I found the root cause already, it is depending on the driver version of the redshift connection component.

V1 will give the datetime in GMT+0,

V2 will give the datetime in the server timezone

 

I also find this info online for your reference:

https://repost.aws/questions/QUzxhtdeEJSqKlrnHMilbIew/redshift-jdbc-driver-getdate-returns-time-in-server-time-zone-instead-of-in-utcd