Date Value Inconsistent

Certified Senior Developer
Why is Appian not recognizing the timezone as being 'CDT' when evaluating the today() function. We have a process that runs at 11:00 pm each Thursday. It starts on time but the first test is to evaluate 'today()' and when it does, the today() value is the next day so the process ends. If it evaluated today() in the CDT timezone - it would continue. I ran several tests to figure this out. I have a workaround for this - I will use 'todate(now())' which I believe will evaluate the date correctly at 11:00 PM CDT because now() recognizes the timezone. Is this a bug? I tested this in both our DEV environment (which is 17.1 and in PROD which is 16.3).

OriginalPostID-269961

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Senior Developer
    To update - the todate() function evaluates the now() in GMT time so todate(now()) did not work for me when evaluating at 11:00 PM CST. The documentation states that to return a localized date for a process initiated by a user, the local() function must be nested within the todate() function. So - todate(local(pp!starttime)) returns the localized date when a given process started. Otherwise the date is returned in GMT.
Reply
  • 0
    Certified Senior Developer
    To update - the todate() function evaluates the now() in GMT time so todate(now()) did not work for me when evaluating at 11:00 PM CST. The documentation states that to return a localized date for a process initiated by a user, the local() function must be nested within the todate() function. So - todate(local(pp!starttime)) returns the localized date when a given process started. Otherwise the date is returned in GMT.
Children
No Data