mirror of
https://github.com/JKorf/CryptoExchange.Net
synced 2025-06-10 01:16:24 +00:00
Fixed exception when deserializing non-nullable datetime value '0' in .net framework
This commit is contained in:
parent
fd1a2bbda9
commit
6e4d9d225e
@ -33,7 +33,7 @@ namespace CryptoExchange.Net.Converters
|
|||||||
{
|
{
|
||||||
var longValue = (long)reader.Value;
|
var longValue = (long)reader.Value;
|
||||||
if (longValue == 0)
|
if (longValue == 0)
|
||||||
return null;
|
return objectType == typeof(DateTime) ? default(DateTime): null;
|
||||||
if (longValue < 1999999999)
|
if (longValue < 1999999999)
|
||||||
return ConvertFromSeconds(longValue);
|
return ConvertFromSeconds(longValue);
|
||||||
if (longValue < 1999999999999)
|
if (longValue < 1999999999999)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user