Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

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)
Both these functions use the Java Calendar object to add the number of days. The first method does not incorporate the timezone when creating a Calender object. The second method incorporates the timezone (last parameter).


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

Was this useful?

100% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us