David Young created NIFI-16121:
----------------------------------

             Summary: Improve Date and Time formatting functions in nifi-utils 
FormatUtils
                 Key: NIFI-16121
                 URL: https://issues.apache.org/jira/browse/NIFI-16121
             Project: Apache NiFi
          Issue Type: Improvement
            Reporter: David Young
            Assignee: David Young


While working in FormatUtils for another reason, I noted that a lot of the 
functions there-in do a lot of manual math to get things like millis or nanos.

Fortunately Java's date / time handling has come a long way since some of these 
functions were written (circa-2016 or older) and a little bit of TLC might be 
in order.

Proposal for this ticket is to use more native date handling functions for 
things like `parseToInstant`, `formatMinutesSeconds`, 
`formatHoursMinutesSeconds`.

At the same time, use string formatting methods to replace functions like 
`pad2Places` and `pad3Places` as applicable.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to