Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LINQ: Fixes preserve DateTime.Kind when passing value to custom JsonConverter #3224

Merged
merged 13 commits into from
Jun 6, 2022
2 changes: 1 addition & 1 deletion Microsoft.Azure.Cosmos/src/Linq/ExpressionToSQL.cs
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ private static SqlScalarExpression ApplyCustomConverters(Expression left, SqlLit
else if (memberType == typeof(DateTime))
ealsur marked this conversation as resolved.
Show resolved Hide resolved
{
SqlStringLiteral serializedDateTime = (SqlStringLiteral)right.Literal;
value = DateTime.Parse(serializedDateTime.Value);
value = DateTime.Parse(serializedDateTime.Value, null, DateTimeStyles.RoundtripKind);
ccurrens marked this conversation as resolved.
Show resolved Hide resolved
}

if (value != default(object))
Expand Down