mirror of
https://github.com/JKorf/CryptoExchange.Net
synced 2025-06-07 16:06:15 +00:00
Fixed parsing of string datetime value "0.00000"
This commit is contained in:
parent
8b513e51b9
commit
ef9de5e338
@ -59,8 +59,12 @@ namespace CryptoExchange.Net.Converters
|
|||||||
if (string.IsNullOrWhiteSpace(stringValue))
|
if (string.IsNullOrWhiteSpace(stringValue))
|
||||||
return null;
|
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;
|
return objectType == typeof(DateTime) ? default(DateTime) : null;
|
||||||
|
}
|
||||||
|
|
||||||
if (stringValue.Length == 8)
|
if (stringValue.Length == 8)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user