[ 
https://issues.apache.org/jira/browse/NIFI-14581?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17953113#comment-17953113
 ] 

René Zeidler commented on NIFI-14581:
-------------------------------------

I looked into this further and found the root cause.
Date parsing happens here: 
[nifi/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/util/DateTimeAdapter.java
 at rel/nifi-2.4.0 · 
apache/nifi|https://github.com/apache/nifi/blob/rel/nifi-2.4.0/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/util/DateTimeAdapter.java]
using {{ZonedDateTime.parse(date, DATE_TIME_FORMATTER)}} with the pattern 
{{{}"MM/dd/yyyy HH:mm:ss z"{}}}.

If you take a look at the response of successful requests, you can already see 
the issue:
!image-2025-05-21-12-41-43-487.png!

The time zone name is "MESZ", which is German for "CEST". The NiFi frontend 
creates a time stamp in English, using "CEST", while the NiFi server expects 
"MESZ". Both the client and server are running on a German Windows 
installation, and the browser is also in German. (Even if the languages were 
different, that shouldn't cause requests to fail.)

The problem here is using localized time zone names instead of standard time 
zone IDs like "Europe/Berlin". Or in this case, where time zone information is 
irrelevant, unix timestamps.

> Provenance Event search/filtering by date doesn't work
> ------------------------------------------------------
>
>                 Key: NIFI-14581
>                 URL: https://issues.apache.org/jira/browse/NIFI-14581
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Core UI
>    Affects Versions: 2.4.0
>         Environment: Edge 136.0.3240.76, Windows 23H2
>            Reporter: René Zeidler
>            Priority: Major
>              Labels: provenance, search, timestamp, ui
>         Attachments: Screenshot 2025-05-21 at 12.06.53.png, Screenshot 
> 2025-05-21 at 12.07.07.png, image-2025-05-20-10-07-14-329.png, 
> image-2025-05-20-10-11-36-518.png, image-2025-05-21-12-38-43-362.png, 
> image-2025-05-21-12-41-43-487.png
>
>
> h1. Summary
> The provenance event search (Data Provenance -> Search Icon) doesn't work 
> whenever the "Date Range" input has a value. This is especially a problem 
> because the date range input contains the current date by default (which it 
> probably shouldn't either):
> !image-2025-05-20-10-07-14-329.png!
> Clicking "Search" when the date range input is filled closes the modal, but 
> the provenance events aren't filtered.
> h1. Cause
> The request to /nifi-api/provenance fails with HTTP 400 "Message body is 
> malformed. Unable to map into expected format."
> The cause seems to be that the "startDate" and "endDate" values are in an 
> unexpected format:
> !image-2025-05-20-10-11-36-518.png!
> Without these parameters the request succeeds.



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

Reply via email to