mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-01-11 19:44:55 +00:00
fix: Fixing JSON datetime parsing in 2017
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user