Daylight Saving Time changes for UK

Certified Associate Developer

We switch our primary timezone from GMT to GMT+1 in the Appian admin console during UK daylight saving time.

In the application, we display all dates using a text() function, like this:

if(
  a!isNotNullOrEmpty(ri!dateTime),
  text(ri!dateTime, "dd/MM/yyyy hh:mm AM/PM"),
  ""
)

However, as soon as the timezone is updated in the admin console, the displayed date values shift according to the new timezone. This causes the date and time shown in the UI to change even though the stored datetime has not changed.

Is there any way to keep the displayed date consistent regardless of timezone changes?

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Senior Developer

    Seems like a timezone conversion issue between your DB's timezone and your Appian instances timezone. Most likely you're on UTC in DB but in Appian you keep changing timezone as you said so when you're on GMT it's the same as DB but when you change to anything else you're seeing the conversion issue.

    Appian automatically converts datetime implicitely from DB timezone to Appian timezone. What will probably fix it is you managing it explicitely with `gmt()` and `local()` functions to undo the auto conversion.

    I also suggest a good amount of testing. There's different ways to mix and match timezones in Appian. Using it in the interface with user's permissions is not going to necessarily. Test your different code implementations to see if it's consistent.

  • 0
    Certified Senior Developer
    in reply to mikels7956

    I answered your question directly. There can be use cases where you will need to do what I suggested. 

    Stephan and Shubham answered the more holistic concern and I agree with them completely. You shouldn't be fiddling with Time zones in the console admin. Appian has to my knowledge basically all supported world time zones. Daylight conversion should be automatically handled there without admin or dev intervention.

Reply
  • 0
    Certified Senior Developer
    in reply to mikels7956

    I answered your question directly. There can be use cases where you will need to do what I suggested. 

    Stephan and Shubham answered the more holistic concern and I agree with them completely. You shouldn't be fiddling with Time zones in the console admin. Appian has to my knowledge basically all supported world time zones. Daylight conversion should be automatically handled there without admin or dev intervention.

Children
No Data