[
https://issues.apache.org/jira/browse/NIFI-15900?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Rakesh Kumar Singh reassigned NIFI-15900:
-----------------------------------------
Assignee: Rakesh Kumar Singh
> Incorporate DST changes in Expression language duration functions
> -----------------------------------------------------------------
>
> Key: NIFI-15900
> URL: https://issues.apache.org/jira/browse/NIFI-15900
> Project: Apache NiFi
> Issue Type: Improvement
> Components: Core Framework, Extensions
> Affects Versions: 2.9.0
> Reporter: Mika Krieg
> Assignee: Rakesh Kumar Singh
> Priority: Major
> Time Spent: 10m
> Remaining Estimate: 0h
>
> When adding durations to timestamps it is important for me to do so with
> respect to the local timezone.
> This often requires the use of an ExecuteGroovyScript to use ZonedDateTime
> functions instead of a simple UpdateAttribute.
> h2. Proposed solution
> So it would be helpful if parsed timestamps act like a ZonedDateTime object
> with the specified timezone.
> {code:java}
> ${literal('2026-03-29 00:00:00'):toDate("yyyy-MM-dd HH:mm:ss",
> "Europe/Vienna"):plusDuration("1 Days"):format("yyyy-MM-dd'T'HH:mm:ssXXX",
> "Europe/Vienna")}{code}
> This expression currently evaluates to {{2026-03-30T01:00:00+02:00}}
> I would like it to evaluate to {{2026-03-30T00:00:00+02:00}} since the
> locally dropped DST hour lies within this day-timeframe.
> h2. supported units
> The timezone sensitive durations would be:
> * years
> * weeks
> * days
--
This message was sent by Atlassian Jira
(v8.20.10#820010)