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

AddTime function returns wrong date for business calendar

SA-26515

Summary



The addTime function does not calculate correct time, when calendar instance is passed as parameter. It calculates correct time when calendar instance is not passed.


Error Messages



Not Applicable


Steps to Reproduce



1. Create Calendar rule with America\New York timezone.
2. Mention the business days from Monday to Friday.
3. Mention the Business hours from 9:00 AAM to 4:00 PM.
4. Write an activity which calls the addTime function to add the 1 day time to 
20160720T200100.000 GMT.


Root Cause



User has given the start date as 20160720T200100.000 GMT, it means 21stJune 8:01 PM in GMT.

As calendar timezone is America or New York, PRPC converts given date to America\New York timezoen, so it becomes 21st June 4:01 PM.

As user mentioned business hours upto 4:00 PM, PRPC takes next business day as starting date and add 1 day to it, So it becomes next to next business day.


Resolution



This is an expected behavior from PRPC as per Calendar configuration.

 

Published August 22, 2016 - Updated October 8, 2020

Was this useful?

0% 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