Support Article
Incorrect date displays on executing addTime function
SA-79193
Summary
Incorrect date displays on executing the addTime function. The following arguments were used in the case:
- Param.SLAValue = 1
- local.datevalue = 20190419
- @(Pega-RULES:BusinessCalendar).addTime(local.datevalue, Param.SLAValue,0,0,0, true, "BAS")
Error Messages
Not Applicable.
Steps to Reproduce
Execute the addTime function with the following parameters in the case:
- Param.SLAValue = 1
- local.datevalue = 20190419
- @(Pega-RULES:BusinessCalendar).addTime(local.datevalue, Param.SLAValue,0,0,0, true, "BAS")
Root Cause
Date object is passed instead of DateTime object to the addTime Rule-Utility-function (RUF).
Resolution
Perform the following local-change:
Use the below query and change the Date object to DateTime object: PRDateFormat.formatInternalDateTime(PRDateFormat.parseAsDateTime(null, "Timezone", null, "Date")).
Published August 19, 2019 - Updated December 2, 2021
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.