Skip to content

Commit

Permalink
Replaced with RoundtripKind as suggested
Browse files Browse the repository at this point in the history
  • Loading branch information
gjdonkers committed Jun 10, 2021
1 parent 5653d3c commit eb00bed
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -92,7 +92,7 @@ bool INodeDeserializer.Deserialize(IParser parser, Type expectedType, Func<IPars
case TypeCode.DateTime:
// TODO: This is probably incorrect. Use the correct regular expression.
var style = scalar.Value.EndsWith("Z")
? DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal
? DateTimeStyles.RoundtripKind
: scalar.Value.Length > 27 ? DateTimeStyles.AssumeLocal : DateTimeStyles.None;
value = DateTime.Parse(scalar.Value, CultureInfo.InvariantCulture, style);
break;
Expand Down

0 comments on commit eb00bed

Please sign in to comment.