TimeZone Changes during day light saving

HI,

Does appian takes care of Day-light saving when the time changes in winter?

  Discussion posts and replies are publicly visible

  • 0
    Certified Lead Developer

    Yes. Internally Appian is using UTC only. When a date&time is used or shown to the user it is translated into the users timezone including daylight saving.

  • Thank you for your response.

    Could you please help us to know if it still works in below scenario?

    Appian implementation:

    How GMT is exported to XML text as BST:

    datetext(local(gmt(ri!trDetails.crdate,"America/New_York"),"Europe/London"), "MM/dd/yyyy HH:mm:ss")

     

     

    How we save date and time based on user input in DB:

    local(save!value,"America/New_York")

     

    How we get GMT date and time based on value in DB:

    gmt(local!itemObj.callbackts,"America/New_York")

     

    Please note that:

    users are not able to change default time zone which is setup as America/New_York

    There is no timezone setup for each process model (left empty) and we do not override with process initiator time zone.

    Process model Properties

     

  • 0
    Certified Lead Developer
    in reply to pooja.sudarshan

    As I already explained, Appian manages time zone translation between UTC internally, this includes DB, and the user.  Cases 2 and 3 just work. Do not add any timezone calculations on top of what Appian is doing.

    Regarding the XML. Is that necessary? The question whether it works ... difficult. The issue is that even in expression designer, Appian still tends to do this kind of translation. So what you see on screen might be not the actual values.

    Converting into another timezone should be simple: local(gmt(now()), "America/New_York")

  • Hi

    Let me explain the context.

    1. Our Appian app and oracle DB are in NAM timezone.

    2. Timezone for all users is set by admin as "America/New_York" and users are not able to change it (option disabled by admin)

    3. Users want to see all Date and Times in GMT. Date and Time in DB should be also saved as GMT.

    3.  If on UI user provide date and time (search criteria) then when we save it to database we use local conversion like below:

    local(save!value,"America/New_York")

    3. When we retrieve DateTime from database to show previously used date time criteria we use gmt conversion as below:

    gmt(local!itemObj.callbackts,"America/New_York")

    4. When we export data from DB to XML business expected to send GMT so in our expression that build XML text we used conversion like this:

    datetext(local(gmt(ri!tradeDetails.crdate,"America/New_York"),"Europe/London"), "MM/dd/yyyy HH:mm:ss")

    Our concern is that - will it work properly when daylight saving time period is end?

  • 0
    Certified Lead Developer
    in reply to Furman

    This is a broken setup to be honest and creates a huge maintenance hell over time. Think about  "Users want to see all Date and Times in GMT. Date and Time in DB should be also saved as GMT." ... just that sentence in context of everything else is set to NAM, is mind bending like "Are you sure that you do not want to cancel the rejection of the request?"

    My suggestion would be to go all in UTC.

    Sorry ....

  • I have not understood your suggesting. Are you able to provide more details what we should change?

  • 0
    Certified Lead Developer
    in reply to Furman

    A good setup is to have all systems run at UTC internally and all timestamps stored in DB are UTC. Then Appian will happily translate that into the users time zone whenever needed.

  • 0
    Certified Lead Developer

    In other words, why is ANYTHING in NAM timezone? Convert everything to UTC timezone, the DB and the Appian instance, then find the setting to allow all the users to set their own timezones for display.  Everyone can see whatever times they want, and all the times will be consistent in the App and the DB.