When using a DateTime property of a SmartObject in SmartForms, the date/time may get stored incorrectly for certain historical dates.
The DateTime property value is stored in the data source using the K2 server’s time zone and is displayed to the user based on the user's regional time zone setting. SmartForms uses the UTC date to load and save values but for backwards compatibly the UTC DateTime must be converted to the K2 server’s time before sending the data to the SmartObject. This is calculated by converting user's time > UTC time > SmartForms runtime server time (IIS) > K2 server > data source and vice versa.
Currently, it is not possible to prevent this automatic conversion when using a DateTime property of a SmartObject in SmartForms.
EXAMPLE OF ISSUE:
|Rule||Starts on||Ends on|
|Daylight savings for dates 1986 - 2007
||The first Sunday in April
||The last Sunday in October
|Daylight savings for dates 2007 - current
||The second Sunday in March
||The first Sunday of November
For example if a user in PST(-8) timezone selects 2006-03-15 00:00 in a Calendar control in a Form, the DST is incorrectly applied to the date, making the effective timezone -7. A UTC date is sent to the SmartForms server of 2006-03-15 07:00. The SmartForms server in the same timezone PST(-8) adjusts the date to server time to a value of 2006-03-14 23:00 (since here DST is calculated correctly on the historic date). This date is passed on to the SmartObject.
Any one of the following options can be performed to resolve this issue: