Support Article
Incorrect date displays on using addDays() after daylight saving
SA-67827
Summary
Incorrect date displays when using the @addDays() function after daylight saving.
Error Messages
Not Applicable
Steps to Reproduce
Perform a property set and use the below function.
param.reportdate = @(Pega-RULES:BusinessCalendar).addDays(@(Pega-RULES:DateTime).getCurrentDateStamp(), -1, false, "")
Root Cause
A defect in user application code or rules.
The two types of addDays() function are,
- @(Pega-RULES:BusinessCalendar).addDays(String, int, boolean, String)
- @(Pega-RULES:BusinessCalendar).addDays(String, int, boolean, String, String)
Resolution
Perform the following local-change:
Use addDays with five arguments, that is with the timezone argument,
For example: @(Pega-RULES:BusinessCalendar).addDays(.PropE, 7, false, UKDefault,"Europe/London")
Published December 4, 2018 - 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.