functions to parse date, time and datetime with given schema
Opened this issue · 1 comments
Is your feature request related to a problem? Please describe.
No need for a workaround like this: https://camunda.github.io/feel-scala/docs/learn/samples/temporal-samples/#change-the-format-of-dates
Describe the solution you'd like
We would like to have a feel function that parses a string to a date, time or datetime with a given schema.
Example: date("18.01.2024","dd.MM.yyyy")
Related issues
- Camunda Jira FR: https://jira.camunda.com/browse/SUPPORT-20156
we have another customer / partner who is requesting this feature.
He wants to use it in our connector templates:
If we would have this feature in place, he could use a custom template + REST Connector.
Right now, we are forcing him to fork our REST Connector and add custom changes (which is not ideal).
Context:
Using the feel function now() produces serialized json for the rest connector that looks like 2024-03-11T16:38:33Z[GMT]" and Azure eventgrid won’t consume the timezone portion of that ([GMT]). It requires an iso date-time string in zulu time, without timezone, like this: “2024-03-11T16:38:33Z”
Really there’s 2 potential issues with getting a timestamp
- Azure Event grid requires that the “eventTime” field of an event message contains a time expressed in UTC, but there’s no way to specify the timezone/offset in which you want to express a timestamp. By happy coincidence, the FEEL now() function seems to be producing a UTC timestamp, but this is an undocumented feature that might happen to be because of a setting on the cluster, but certainly not something I can depend on in perpetuity.
- The timezone info is expressed in the format string, and there’s no way to specify this.