2017-05-05 101 views
0

使用LINQPad来查询的OData V2服务器发现最近被修改,并得到意想不到的结果记录:的OData查询用的DateTimeOffset

// Define a DateTimeOffset to test against 
DateTimeOffset testDateTimeUTC = DateTimeOffset.UtcNow.AddMinutes(-180); 

// Detect changes that have occurred since the test DateTimeOffset 
var changedRecords = EmpJob 
.Where (e => e.lastModifiedDateTime >= testDateTimeUTC); 

changedRecords.Dump(); 

生成的查询字符串:

https://api10.successfactors.com/odata/v2/EmpJob()?$filter=lastModifiedDateTime ge datetimeoffset'2017-05-05T00:12:18.9383091Z' 

我得到三个结果回来,一个是正确的,另外两个是时间戳: 3/10/2016 1:01上午+00:00和21/12/2016 1:37上午+00:00显然无效。

对我来说,它看起来像一个服务器端问题,任何人都可以看到我失踪的问题?

回答

0

使用具有开始日期和结束日期的过滤器解决了问题。