Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Date controls display incorrect date format

SA-370

Summary



The out-of-the-box (OOTB) controls Date-Short, Date-Medium, Date-Long and Date-Full are displaying an incorrect date one day off (-1 day) from the date being supplied.

Steps to Reproduce



Use a datetime property set to a time zone other than the user's local time and display it as one of the above type of properties.


Root Cause



The root cause of this problem is
the timezone change done automatically on datetime properties.  If you set a property to July 26 00:00 (midnight) GMT, and display it using a date (NOT datetime) control, the date control will automatically convert the data to the user's local timezone.  If the user's timezone is enough time ahead or behind to change the date (for example if the user is in EST which is GMT-5) the date will change as well as the time (in this example, to July 25 19:00).

Resolution



This issue is resolved through the following local change: use
a date, rather than a datetime control, for any properties that should be date only and thus not be converted to different timezones.

Published March 10, 2016 - Updated October 8, 2020

Was this useful?

50% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us