1
0
mirror of https://github.com/JKorf/CryptoExchange.Net synced 2025-06-09 17:06:19 +00:00

Fixed exception when deserializing non-nullable datetime value '0' in .net framework

This commit is contained in:
Jkorf 2022-02-02 09:42:22 +01:00
parent fd1a2bbda9
commit 6e4d9d225e

View File

@ -33,7 +33,7 @@ namespace CryptoExchange.Net.Converters
{
var longValue = (long)reader.Value;
if (longValue == 0)
return null;
return objectType == typeof(DateTime) ? default(DateTime): null;
if (longValue < 1999999999)
return ConvertFromSeconds(longValue);
if (longValue < 1999999999999)