Skip to main content


 

Symptoms


There is an inconsistency between SMO Tester and SP for the date field. In SP I can see the dates as '3/7/2018' but when I run the SMO for the same DL in tester it showing as '3/8/2018'.
 

Diagnoses


This was an all-in-one environment that was hosting the SQL server, K2 server, Sharepoint Farm, and was also where the browser and SmartObject Service Tester tool was being executed from. It was determined that although the server was in the CST timezone, the Sharepoint site had its regional setting set to the PST timezone (this setting is per sites). Although a Sharepoint 'Date and Time' type > 'Date Only' field was being used this was still stored in Sharepoint in a DateTime Format and can be verified with:

SELECT *
FROM MSharepointContentDatabaseName].]dbo].]AllUserData]
ORDER BY Ytp_Created] DESC

*if you are looking for the latest entry added

It was the difference in the timezone settings that is resulting in this different date.
 

Resolution

After setting the Regional Settings for this site to match the server timezone, the date in the Sharepoint Library and SmartObject Service Tester tool is now matching.

Depending on the usage of this Date field and if there is a timezone different between the K2 Server and Sharepoint Regional Settings, perhaps storing this field in a Text field is applicable or using inline functions and conditional statements to cater for this difference.




 
Be the first to reply!

Reply