Day of function in Report Definition returns wrong day
SummaryUsing the 'Day of' function on pyResolvedTimestamp returns wrong day in Report Definition
Error MessagesNot Applicable
Steps to Reproduce
- Create a Report Definition to report on resolved work items.
- In the Report Definition configure a column as Day of(.pyResolvedTimestamp).
- Resolve a work item such that its timestamp would fall in today as per server's local time and when converted to GMT it would fall in next day.
- Run the report and see that Day of(.pyResolvedTimestamp) returns next day while the item was resolved today.
Root CausePega 7
stores the timestamp in GMT time in the blob. When a column is exposed the timestamp is stored in the local time of the server. If the data is read via an Obj-browse or Obj-open, the Engine does the proper conversion from GMT to local time. However in the ‘Day of’ function alias used in a Report Definition, it uses the timestamp stored in the local time of the server and may return an unexpected result.
ResolutionPerform the following local-change:Create a function alias using the pxDay function alias and handle the conversion.
Published December 9, 2016 - Updated December 13, 2016