Posted: 8 Aug 2015 15:41 EDT Last activity: 15 Aug 2015 5:21 EDT
addDays function returning different values
We are using addDays function to add a specified number of days to a Date. This function is used within an Activity and this Activity is called from two different applications. In most of the cases, the resulting date will be same in both the applications. However, in very few cases, the dates are different - one day less in the second application. The Primary page used is different in each application. Upon tracing, I found that the date difference is after the addDays function is executed I mean there is no other formatting or logic that is used down the line to update these dates. We are using the @addDays(String,int,boolean,String) format of this function. Any insights on why this could be happening and only in some cases?
It might be due to the timezone being different for each requestor. Look on the pxRequestor page under system pages to see if the property pyUseTimeZone is different. 10 pm in New York on December 31st is January 1st in London. That could be your one day difference.
Thank you for the reply. After some research I figured that this may be due to the GMT timezone issue like you said. In one of the applications, the property pxRequestor.DisableTimeZoneConversion is false and in the other application, it is true. So this is causing problems. If the timepart for any value is on or after 8 PM Eastern Time, it gets displayed as next day. This started happening after an upgrade to Pega 6.3 last year.
Posted: 6 years ago
Posted: 15 Aug 2015 5:21 EDT
Phani Sahukaru (sahup1)
Architect - Financial Services
if the property pyDisableTimezoneConversion is set to true in OOTB axtnsion activity ApplicationProfileSetup we would generally see such differences ... could you please check if the extension activity is overridden?