In FEEL expression I want to get current hour and minute in a specific timezone.
To do a check like:
now().hour >= 9 and now().hour < 18
But now() is in “@Etc/UTC” i.e. in UTC time zone. How can I make now() return value in “@Europe/Paris” timezone so that now().hour will have Paris hour and not UTC hour value?
I tried below code but the BPMN deployment fails:
let parisTimeNow = date and time(now(), "Europe/Paris")
in parisTimeNow.hour >= 9 and parisTimeNow.hour < 18
You can convert now() to a specific timezone using the date and time(date, timezone) function, e.g. date and time(now(), "Europe/Paris").hour. I found the following relevant resources: