[ 
https://issues.apache.org/jira/browse/NIFI-6442?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17551679#comment-17551679
 ] 

Raj commented on NIFI-6442:
---------------------------

[~ijokarumawak]  [~archon] , i see this issue in executesql while connecting to 
Postgress. For any date fields its performing -8hrs as iam in HK timezone. Iam 
on 1.16.1. Any other versions i should look for this fix?

> ExecuteSQL/ExecuteSQLRecord convert to Avro date type incorrectly when set 
> 'Use Avro Logical Types' to true
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: NIFI-6442
>                 URL: https://issues.apache.org/jira/browse/NIFI-6442
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Extensions
>            Reporter: archon gum
>            Assignee: archon gum
>            Priority: Major
>             Fix For: 1.10.0
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
>  
> '2019-01-01' will consider to be '2019-01-01 00:00:00' which 1546300800000L 
> milliseconds in UTC.
> But in other time zone such as '+08:00', do "select date('2019-01-01')" and 
> result.getObject() or result.getDate() will return java.sql.Date object but 
> java.sql.Date.getTime() return 1546272000000L instead of 1546300800000L which 
> it's 8 hours earlier.
> Currently, ExecuteSQL return "(java.sql.Date.getTime() - 0) / 86400000" as 
> epoch days



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to