1
0
mirror of https://github.com/JKorf/CryptoExchange.Net.git synced 2026-08-11 16:32:57 +00:00

Fixed parsing of string datetime value "0.00000"

This commit is contained in:
JKorf
2024-01-04 21:31:51 +01:00
parent 8b513e51b9
commit ef9de5e338
@@ -59,8 +59,12 @@ namespace CryptoExchange.Net.Converters
if (string.IsNullOrWhiteSpace(stringValue))
return null;
if (string.IsNullOrWhiteSpace(stringValue) || stringValue == "0" || stringValue == "-1")
if (string.IsNullOrWhiteSpace(stringValue)
|| stringValue == "-1"
|| (double.TryParse(stringValue, out var doubleValue) && doubleValue == 0))
{
return objectType == typeof(DateTime) ? default(DateTime) : null;
}
if (stringValue.Length == 8)
{