Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
8 replies
Subscribers
7 subscribers
Views
5980 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
Date Value Inconsistent
judym598
Certified Senior Developer
over 7 years ago
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
0
Stefan Helzle
A Score Level 3
over 7 years ago
Did you check the timezone settings in model properties? Appian itself is always GMT. Overwriting process timezone with the initiator timezone might help you.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
judym598
Certified Senior Developer
over 7 years ago
Yes - checked that as well.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
judym598
Certified Senior Developer
over 7 years ago
FYI - I opened a support case for this and was told that this issue has been reported before and has been confirmed to be a bug. FYI - Appian is tracking this internally via AN-41155.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Stefan Helzle
A Score Level 3
over 7 years ago
OK. Thanks for the info.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
judym598
Certified Senior Developer
over 7 years ago
No problem. Until it gets fixed, if you're needing to check a date using the today() function and the GMT issue could impact your results, the workaround I'm using should help, i.e., todate(now()).
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
martinc8721
over 7 years ago
have you tried calling an external service in order to get the dateTime and timezone you need?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
judym598
Certified Senior Developer
over 7 years ago
No - we haven't tried that but using the todate(now()) works.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
judym598
Certified Senior Developer
over 7 years ago
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.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel