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

Output of the addTime function is incorrect



The out-of-the-box addTime function output for the below dates is incorrect.
  • 30th June 2019
  • 30th September 2019

Error Messages

Not Applicable

Steps to Reproduce

  1. Create two fields of type DateTime.
  2. For one of the columns, set the value as 30th September 2019 (or any quarter end date).
  3. Create a new calendar instance with any time zone.
  4. Use the below function to calculate the value of the other field.

    @addTime(.Install_Date, -10, 0, 0, 0, true,Param.Calendar)

    Instead of .Install_Date, provide the value of the first field and pass the name of the new calendar instance created instead of Param.Calendar.

    For example:

    @addTime( 20190930T000000.000 GMT, -10, 0, 0, 0, true, Calendar_CA_2019 )

Root Cause

The API, that was used to parse the input DateTime, used the JDK's internal Date parser which parsed the date in UTC standard. Hence, the input DateTime passed to addTime API was always in GMT and the value returned was also in GMT.
There was no API that parsed the DateTime to the given timezone.


An enhancement request, FDBK-30873, is created for consideration by Pega Product Management.

Published August 15, 2019 - Updated December 2, 2021

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