I have a variable of type DateTimeOffSet. I would like to filter out all projects created after January 1, 2010.
So, I wrote the following query:
var _date = new DateTimeOffset(2010, 01, 01, 0, 0, 0, new TimeSpan(-7, 0, 0)); var projects = _repository.Find<Project> (x => x.CompanyId = CompId && x.CreatedOn > _date) .ToList();
But when I look at the database, this is the type of values that I see:
2001-01-25 05:21:46.4370000 -08:00 2005-06-17 00:00:00.0000000 -07:00
Obviously, some of the values have -08: 00 , while others have -07: 00 . So my previous request still matters? When I look at the result, filtering is done as I expect. The only concern is that the meaning of this biased part, maybe the result is good by chance.
I am not familiar with how DayeTimeOffSet works.
source share