fix: Fixing JSON datetime parsing in 2017

This commit is contained in:
Laura Gomez
2019-07-30 12:16:29 -04:00
parent 0f5632ced8
commit 149f480add
2 changed files with 8 additions and 0 deletions

View File

@@ -213,8 +213,12 @@ namespace ICD.Common.Utils.Extensions
if (extends == null)
throw new ArgumentNullException("extends");
#if SIMPLSHARP
string stringValue = extends.GetValueAsString();
return JsonUtils.ParseDateTime(stringValue);
#else
return (DateTime)extends.Value;
#endif
}
}
}

View File

@@ -39,7 +39,11 @@ namespace ICD.Common.Utils.Json
if (token == null)
throw new ArgumentNullException("token");
#if SIMPLSHARP
return ParseDateTime((string)token);
#else
return (DateTime)token;
#endif
}
/// <summary>