Is this an error in WSS3.0 web service requests?

I am struggling to debug a query that filters an element based on the Modified field using the list web service and the GetListItems method to retrieve only those elements that have changed since the last check.

Here is the query parameter:

<Where>
  <Gt>
    <FieldRef Name="Modified" /> 
    <Value Type="DateTime" IncludeTimeValue="TRUE">2010-11-23T17:0:00Z</Value> 
  </Gt>
</Where>

It was difficult for me to understand why this did not work, since one item in the list was explicitly changed after this date, indicated in UTC. This is because although you specify it in UTC (also mandatory in the parameter parameter), Sharepoint will literally compare it with the modified timestamps saved or displayed with the language version specified in the site settings.

I am not sure that I am understandable, here is an example:
The site I am requesting is in the EST locale, and the last item was changed today at 12:11:00, which is 17: 12: 00Z.

I last checked for updates at 16:00 GMT, so my query parameter will contain the following:

<Where>
  <Gt>
    <FieldRef Name="Modified" /> 
    <Value Type="DateTime" IncludeTimeValue="TRUE">2010-11-23T16:00:00Z</Value> 
  </Gt>
</Where>

And this will not return any value, because sharepoint compares 16: 00: 00Z with 12:11:00 literally and, thus, has no updates after 16: 00: 00Z.

I confirmed this by putting 12: 10: 00Z in the request, and there I get the list item that I wanted. Put 12: 12: 00Z and it will no longer be in the results.

, , , WSS 3.0, - ? , ? BTW, UTC , . , , -?


Update: . SharePoint -? .

+3
1

, , :
Sharepoint -?

UTC, UTC, , node.

   ndQuery.InnerXml = "<Where><Gt><FieldRef Name='Modified' />" +
   "<Value Type='DateTime' IncludeTimeValue='TRUE'>" + (last_update + offset).ToString("yyyy-MM-dd") + " " + (last_update + offset).ToString("HH:mm:ss") + "</Value></Gt></Where>";
+1

Source: https://habr.com/ru/post/1776522/


All Articles