You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2021/03/31 12:33:17 UTC

[GitHub] [nifi] exceptionfactory commented on pull request #4773: NIFI-8161 NiFi EL: migration from SimpleDateFormat to DateTimeFormatter

exceptionfactory commented on pull request #4773:
URL: https://github.com/apache/nifi/pull/4773#issuecomment-811032497


   Thanks for the helpful reference @jfrazee!  After reviewing the API documentation for `SimpleDateFormat` and `DateTimeFormatter` again in light of the Spark issue, it looks like another key difference is that `SimpleDateFormat` supports lowercase `z` as a General time zone reference, whereas `DateTimeFormatter` does not support it.  Implementing a unit test using the lowercase `z` as part of the parsing pattern should present the differences between the implementations.
   
   Thanks for highlighting the issues you have uncovered @arkadius.  It would be great to find a way forward, unfortunately I'm not sure about the timeline for a new major release, or the best approach for now.  One option is providing a way to use this `DateTimeFormatter` approach as an optional feature.  This would require reworking the PR to implement new Evaluators, as opposed to changing the existing ones.  As far as how this could work, one approach might be a new `toDateTime()` function, which would avoid conflicting with the existing `toDate()` function.  This would allow users to migrate to the new implementation without breaking existing flows.  What do you think @jfrazee and @turcsanyip?
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org