Support Article
DateTime displays differently from different time zones
SA-8370
Summary
When a user in the eastern time zone enters a date (and only a date) in PRPC 6.2 SP2, this date is put into a datetime property. However, only the date portion is used, so the time portion of the datetime is defaulting to midnight (for example: 20150320T000000.000). Since the database server is located in central time zone, when the user submits, the datetime that gets written to the database is converted to central time zone time (from 20150320T000000.000 to 2015-03-19 23:00:00.000). If a user opens this record from eastern time zone the date is again converted and it displays correctly. However, if a user from central time zone opens the record, it displays incorrect date becuse there is no conversion.
Resolution
For instances where only the date is needed, it is correct to use the Date property type, which does not have time and timezone specific information (and would not be affected by timezone changes).
See the below PDN link to know more.
https://pdn.pega.com/sites/default/files/help_v717/procomhelpmain.htm#concepts/concepts2/conceptsdatetime.htm
To support varied needs, three different property types are available:
- Date - A day of the Gregorian calendar, without reference to a time zone or locale. The unit is a whole day, such as July 23, 2006.
- TimeofDay - A time of day, without reference to a time zone or locale. The unit is seconds, such as 15 seconds after 1:25 P.M.
- DateTime - A date and time, stored internally to the millisecond if available, in a known time zone. For example 15.452 seconds after midnight on July 23, 2006 in London, U. K.
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.