Hi All,
I have one query related to time zone conversion.
I have start and end date with EDT time zone, and i have to convert this date with given time zone like Mountain, Pacific, Eastern so on.
Can any one help me with same.
Thank you
Discussion posts and replies are publicly visible
As Mike suggested it is bit tricky to work with multiple time zone conversion, as Appian when run in process model unless overridden by the PM time zone feature treats date time in GMT else on UI it is based on the default time zone set on admin console.
Though it is not a very good way of doing it I found it useful to calculate it like below and save it in DB as the value saved will not contain time zone part hence it saves the date and time value of the provided time zone (in case of below example 'Asia/Colombo' time).
gmt( local(now(), "Asia/Colombo"))
or you can have an offset filed saved in a database table column of each record (+5 or -1 ) depending on the time zone and and use that to manually calculate the date time values when you need specific value to display or do calculation based on the time.
Should be the opposite no?
local(gmt(local!dateTime), "Canada/Eastern")
Stefan has a post that covers this: https://appian.rocks/2023/02/13/working-with-time-in-appian/
It really does not matter much as gmt and local functions counteract each other,
for example both of below expressions provides the same output,
{ local(gmt(now()), "Canada/Eastern"), gmt(local(now(),"Canada/Eastern")) }
Yeah sorry read it too quickly.