AddTime function returns wrong date for business calendar
SummaryThe 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 MessagesNot Applicable
Steps to Reproduce1. 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
Root CauseUser 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.
ResolutionThis is an expected behavior from PRPC as per Calendar configuration.
Published August 8, 2016 - Updated August 22, 2016