1
0
mirror of https://github.com/JKorf/CryptoExchange.Net.git synced 2026-08-11 16:32:57 +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
@@ -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)