Support Article
Exposed field behavior incorrect
SA-74047
Summary
User sets a DataTime property from the Text field in the 20180531T070000.000 GMT Pega format from a BST time period in the DateTime field. The user adjusts it to GMT by reducing an hour using the @DateTime.addToDate function. However, this results in the exposed field adding an hour. The issue occurs when the data is committed to the database against the exposed field of type DateTime.
The resultant BLOB value is adjusted as required. However, DateTime properties are converted with the consideration of the Operator Locale. The properties are stored in the database as GMT by default. Issue is with the updating of the field on the database. The values in the property in the BLOB and Clipboard are correct.
Error Messages
Not Applicable
Steps to Reproduce
- Configure a text property containing the Pega timestamp 20180531T070000.000 GMT which relates to the BST time period
- Configure a DateTime property
- Set the value of the DateTime property to that of the text property
- Adjust the value of the DateTime property using the @DateTime.addToDate function to reduce the time by an hour
- Commit the change to the database. Result displays as 20180601T060000.000 GMT in the BLOB but 07:00:00.000 displays in the database. However, database is MS SQL
Root Cause
The date adjustment is performed by the Java Database Connectivity (JDBC) driver which depends on the JVM time zone argument.
Resolution
Perform the following local-change:
Set the App server JVM such that it uses the UTC time zone.
Published August 19, 2019 - 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.