I've been struggling with this behaviour for a while now:
- In my Blazor app 've set the culture to nl-NL (which at the moment is UTC+2)
- Converting a normal datetime to UTC gives me the result i expect.
IE. var test =new DateTime(1978, 9, 4).ToUniversalTime();
Results in test being '1978-9-3 22:00:00Z'
Now when i use the Grid component with a default filter row i handle the 'OnRead' event of the grid and use the ToODataString() to get the formatted filter:
var filter = args.Request.ToODataString();
No matter what i try, the filter returned always formats the dates i filter incorrect. Filtering on '1978-09-04' is formatted as '1978-09-04 00:00:00Z' while i expect it to be '1978-09-03 22:00:00Z'.
Am i missing something trivial here or is this a bug in the ToODataString method?