Support Article
addCalendar function calculates one hour less in DST server time
SA-45810
Summary
DateTime calculations using addCalendar function in DST displays an earlier date with one hour less in GMT. This occurs when months are added to the DateTime property.
Error Messages
Not Applicable
Steps to Reproduce
Use the DateTime.addCalendar() function to add the number of months to a date.
Root Cause
This behavior is as per Pega product design. The time zone in the Operator Work tab was set to Europe or London time zone.
The Europe or London time zone is equivalent to GMT during the normal time period. After DST transition, offset of Europe or London timezone is GMT+1:00.
Resolution
The addCalendar Rule Utility Function (RUF) provides formatted DateTime in GMT.
For example,
If the input date is 3/27/2017 (dd/mm/YYYY), the date after adding a month is 4/27/2017. On formatting to GMT, the date in DST is 4/27/2017.
Offset is GMT+1:00 (BST= GMT+1:00) and the resultant DateTime in GMT is '20170426T230000.000 GMT'.
Published March 24, 2018 - 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.