Does DbFunctions.TruncateTime behave differently in different server time zones?
问题 I'm not sure that my question Title is perfect - so please allow me to explain a little further. Here's a snapshot of some test data: Here's my code: Function TestDb() As ActionResult Dim clientLocId As Integer = 23 Dim showDate As New Date showDate = New Date(2015, 8, 14) 'showDate = New Date(2015, 9, 22) 'showDate = New Date(2015, 9, 27) Dim orderRecs = db.Orders.Where(Function(x) x.ClientLocationId = clientLocId AndAlso x.OrderNumber IsNot Nothing _ AndAlso x.DateCompletedUtc IsNot Nothing