You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "David Handermann (Jira)" <ji...@apache.org> on 2021/06/29 14:49:00 UTC

[jira] [Created] (NIFI-8748) PutKudu Incorrect Date Conversion from String

David Handermann created NIFI-8748:
--------------------------------------

             Summary: 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


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)