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

addCalendar- when adding Months the DST maps 1 hour less.

SA-36461

Summary



When adding time (weeks, month, years, and under some circumstances, also days) to a DateTime property, using the DateTime.addCalendar() function, this would result in one hour less or more than expected, given that a daylight savings time switch date is within the spanned period of time.

Another supposition is that the server's time zone setting is UTC - as recommended - or another time zone with a different DST handling than the client's time zone, and that the client time zone knows daylight savings time periods.


Error Messages



There were no error messages


Steps to Reproduce



Use the DateTime.addCalendar() function to add x number of months to a date.


Root Cause



The function DateTime.addCalendar() did not consider the client time zone; it always worked with the server's time zone setting.

Resolution



Apply HFix-33499.

Published May 6, 2017 - 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