diff --git a/src/Microsoft.AspNetCore.OData/Edm/EdmPrimitiveHelper.cs b/src/Microsoft.AspNetCore.OData/Edm/EdmPrimitiveHelper.cs index 4226f0a08..3d266f2d7 100644 --- a/src/Microsoft.AspNetCore.OData/Edm/EdmPrimitiveHelper.cs +++ b/src/Microsoft.AspNetCore.OData/Edm/EdmPrimitiveHelper.cs @@ -106,7 +106,7 @@ public static object ConvertPrimitiveValue(object value, Type type, TimeZoneInfo DateTimeOffset dateTimeOffsetValue = (DateTimeOffset)value; TimeZoneInfo timeZone = timeZoneInfo ?? TimeZoneInfo.Local; dateTimeOffsetValue = TimeZoneInfo.ConvertTime(dateTimeOffsetValue, timeZone); - return dateTimeOffsetValue.DateTime; + return dateTimeOffsetValue.UtcDateTime; } if (value is Date)