[
https://issues.apache.org/jira/browse/NIFI-13972?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17896004#comment-17896004
]
Peter Turcsanyi commented on NIFI-13972:
----------------------------------------
I did performance measurement with a FlowFile containing 1M records. If the
input pattern/data have timezone component (i.e. the inout can be parsed by the
1st ZonedDateTime and there is no exception fallback), the processing time is
~1800 ms. In case of no timezone in pattern/data (ZonedDateTime cannot parse
it, falling back to LocalDataTime), the result is 8000-10000 ms. So the
exception fallback case is roughly 5-6 times slower.
I suggest using DateTimeFormatter.withZone(ZoneId.systemDefault()) to set the
default/fallback timezone and then ZonedDateTime can be used to parse all
(local or zoned) datetimes. It provides consistent performance (~1800 ms for
both cases). I can put up a PR to demonstrate the solution.
> ObjectLocalDateTimeFieldConverter.convertField ignores time zone
> ----------------------------------------------------------------
>
> Key: NIFI-13972
> URL: https://issues.apache.org/jira/browse/NIFI-13972
> Project: Apache NiFi
> Issue Type: Bug
> Reporter: Tamas Palfy
> Assignee: Tamas Palfy
> Priority: Major
>
> When the incoming value is a string that contains timezone/offset information
> the returned LocalDateTime simply ignores that part and returns a value as if
> it was in the local timezone.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)