Support Article
When condition returns false after daylight saving
SA-77124
Summary
The below When condition returns false after daylight saving on March 31:
@(Pega-RULES:String).toDate(20190404(yesterdays date usually))>=@today()-1
Error Messages
Not Applicable.
Steps to Reproduce
Run a flow with the below When condition post daylight saving:
@(Pega-RULES:String).toDate(20190404(yesterdays date usually))>=@today()-1.
Root Cause
A defect in Pegasystems’ code or rules.
As daylight saving starts there is an one hour time difference. When only date is passed to the Date function, it considers time as 000000.00 GMT and as there is one hour time difference the time considered is 230000.00 GMT which was the previous day.
Resolution
Perform the following local-change:Append T000000.000 GMT to the user input date by using the below setting:
@toDate(param.Date+"T000000.000 GMT")
Published August 15, 2019 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.