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
Steps to Reproduce
- Create two fields of type DateTime.
- For one of the columns, set the value as 30th September 2019 (or any quarter end date).
- Create a new calendar instance with any time zone.
- 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.
@addTime( 20190930T000000.000 GMT, -10, 0, 0, 0, true, Calendar_CA_2019 )
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.
0% found this useful