fix for JObject.ToObject to respect DateTimeZoneHandling
https://github.com/JamesNK/Newtonsoft.Json/issues/1531
This commit is contained in:
committed by
James Newton-King
parent
3d2e9c13ad
commit
9b98a11db2
@@ -990,6 +990,11 @@ namespace Newtonsoft.Json.Serialization
|
||||
}
|
||||
}
|
||||
|
||||
if (value is DateTime dt)
|
||||
{
|
||||
return DateTimeUtils.EnsureDateTime(dt, reader.DateTimeZoneHandling);
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user