Skip to main content


 

Symptoms

 


DateTime values show the day prior for users in a different time zone.
 

 

Diagnoses

 


DateTime values are stored in the server's time zone. When bringing the value into a SmartForm and using it in a function or control, the date is automatically converted to the local user's time zone via client-side JavaScript.  This issue commonly occurs when the time value is set to 12AM (00:00:00Z) as the time zone conversion will end up subtracting hours into the day before when the end user is in a subtractive UTC time zone.
 

 

Resolution

Change the DateTime SmartObject type to Date, which will allow date values to be brought into SmartForms without converting.

Alternatively, I've listed a workaround below:

Assuming that you want to show the date without the time, as recorded in the server's time zone, add an Expression that takes in the original DateTime and truncates the time component. This can be added directly to a calendar control, and looks like the following:

Left( datetime, 10 )

This will return 10 characters from the left side, assuming the standard SmartForm-converted DateTime format of 'YYYY-MM-DD HH:MM:SSZ', which will not be converted by the Calendar control.

 

 



 
Be the first to reply!

Reply