mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-04-12 03:57:32 +00:00
fix: Fixing JSON datetime parsing in 2017
This commit is contained in:
parent
0f5632ced8
commit
149f480add
2 changed files with 8 additions and 0 deletions
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue