Support Article
adddays function in BusinessCalendar Library inconsistent
SA-22615
Summary
When using the adddays() function in a custom activity as shown below, if the input date is before daylight saving time and the targeted end date is after, the output of this function returns one day prior expected end date.
@addDays(InputDate, 8, false, "USDefault")
For Example:
@addDays("20160307", 8, false, "USDefault") returns 20160314
Error Messages
Not Applicable
Steps to Reproduce
- Create an activity with a Property-Set that equals the result of the following function call: @addDays("20160307", 8, false, "USDefault") returns 20160314
- Turn PRPC tracer on and run created activity.
- Review the results within the tracer viewer.
Root Cause
An issue in the custom application code or rules. The application was configured to set the propertypxRequestor.pyDisableTimeConversion to "true" which effects the timezone conversion of functions within the DateTimeUtils
Resolution
Use addToDate().
https://pdn.pega.com/support-articles/day-light-saving-issue
Published May 1, 2016 - 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.