Convert Time zone

Certified Associate Developer

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

Parents
  • 0
    Certified Lead Developer

    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.

Reply
  • 0
    Certified Lead Developer

    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.

Children