Calendar Control displays a different Date value in different Time Zones
kbt135043
PRODUCTIssue
A Calendar Control may display a Date with an incorrect day value when viewed in different Time Zones.Symptoms
When a Calendar Control is used to display a Date Value retrieved from a SmartObject, the date may be displayed as either the day before or after the actual date saved. The issue can occur when a SmartForm is accessed from a different Time Zone than the K2 Server.Resolution
This behaviour is correct by design and can be explained as follows:
The Date/Time value is submitted in the Calender Control with the User’s Time Zone value (e.g UTC+5). The K2 server then converts the Value to Server Time Zone before saving it to a SmartObject (e.g. UTC). When this value is retrieved by a user in a different region, their Time Zone offset is again applied to the value (e.g UTC-5). This will result in a date possibly being displayed differently from how it was saved by the original user.
This is expected behaviour. To stop the time zone conversions from being applied, the following Rule can be added to set the Control to always use a specific time zone, irrespective of a User's local time zone:
When the View executed Initialized, then set the properties of sCalendar control]. In the rule (configure), set the “Display Time Zone” to the preferred value (e.g UTC).