Peter Turcsanyi created NIFI-15308:
--------------------------------------

             Summary: Time record field converters should handle time offset
                 Key: NIFI-15308
                 URL: https://issues.apache.org/jira/browse/NIFI-15308
             Project: Apache NiFi
          Issue Type: Bug
            Reporter: Peter Turcsanyi
            Assignee: Peter Turcsanyi


Several record reader services (like Json, XML and CSV) allow to specify a Time 
Format pattern that is used to parse the input string. The pattern may contain 
a time offset part (e.g. HH:mm:ss.SSSX, where X stands for time offset like Z 
or +0100) but it is not handled by ObjectLocalTimeFieldConverter (and 
ObjectTimeFieldConverter calling the former). The result is that the output 
time field represents a different time when the JVM's system time zone differs 
from the offset of the input data.

Example input (Json), NiFi running in UTC+1:
{code:java}
{
  "dateTime": "2025-11-30T13:05:30.123Z",
  "time": "13:05:30.123Z"
}
{code}
Example output (XML):
{code:java}
<records>
  <record>
    <dateTime>2025-11-30T14:05:30.123+01</dateTime>
    <time>13:05:30.123+01</time>
  </record>
</records>
{code}
The 'dateTime' field was added for reference where the time offset is handled 
properly. Time conversion should follow the same approach.



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

Reply via email to