Support Article
Today function is setting wrong date in certain locales
SA-5654
Summary
For users in certain locales that are different from the server's local, the today function is setting the date as yesterday's date in the user interface, while setting the correct date in the Clipboard.
Error Messages
No error but wrong behavior
Steps to Reproduce
Create a data trasformation that set a property with today function. Set in Argentina/Buenos Aires timezone your end user and create a section that show this property.
Root Cause
The timezones with the error are Western Hemisphere timezones and are the result of how PRPC stores datetime values with a timezone of GMT.
Resolution
The symptoms point to this as a problem of displaying midnight GMT in a "GMT-" Western Hemisphere time zone.
It appears that the date/time value with a time of midnight is being converted to the corresponding date/time in Argentina, the timezone setting. Midnight on 10 December GMT is 9PM on 9 December in Buenos Aires. Then to display the value in the Date Completed box, which is displaying only a date, the time is not used and the date is shown as 09/12/2014.
Does the same issue occur for other "GMT-" Western hemisphere timezones? Such as Santiago or Bogota?
Do other "GMT+" Eastern hemisphere timezones show the expected date? Such as Beijing or Tokyo?
These two PDN articles may help with explaining the processing which is occurring:
https://pdn.pega.com/java-and-activities/how-to-extract-a-datetime-value-to-a-date-or-time-of-day-value
https://pdn.pega.com/sites/default/files/help_v55/procomhelpmain.htm#concepts/concepts2/conceptsdatetime.htm
Published January 31, 2016 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.