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

ASF subversion and git services commented on NIFI-8748:
-------------------------------------------------------

Commit b27c2b500e1c2d889078d0a63fcb10556cfbe621 in nifi's branch 
refs/heads/main from David Handermann
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=b27c2b5 ]

NIFI-8748 Corrected PutKudu String to java.sql.Date parsing

- Added getDateFormat() using default time zone instead of GMT time zone from 
DataTypeUtils.getDateFormat()

NIFI-8748 Adjusted Date Format to use DataType.getFormat()

Signed-off-by: Pierre Villard <[email protected]>

This closes #5194.


> PutKudu Incorrect Date Conversion from String
> ---------------------------------------------
>
>                 Key: NIFI-8748
>                 URL: https://issues.apache.org/jira/browse/NIFI-8748
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Extensions
>    Affects Versions: 1.13.2
>            Reporter: David Handermann
>            Assignee: David Handermann
>            Priority: Major
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> The PutKudu processor uses NiFi {{DataTypeUtils.toDate()}} when converting 
> from a NiFi {{Record}} to a Kudu {{PartialRow}} for date fields.  This works 
> as expected when the Record field value is a {{java.sql.Date}}, but can 
> result in subtracting one day from the original value when the Record field 
> value is a {{String}}.  The problem occurs as a result of 
> {{DataTypeUtils.getDateFormat()}} using a default Time Zone of GMT.  As a 
> result of using {{SimpleDateFormat.parse()}}, an input string of 
> {{2000-01-01}} results in a {{java.sql.Date}} of {{1999-12-31}}.  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to