Merge remote-tracking branch 'origin/ConnectPro_v1.1' into ConnectPro_v1.2

# Conflicts:
#	CHANGELOG.md
#	ICD.Common.Utils/Properties/AssemblyInfo.cs
This commit is contained in:
Chris Cameron
2019-04-08 10:55:52 -04:00
2 changed files with 18 additions and 0 deletions

View File

@@ -34,6 +34,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Better VC-4 support for IcdConsole
- JSON refactoring for simpler deserialization
## [8.3.1] - 2019-04-05
### Changed
- Fixed FormatException when parsing some JSON DateTimes
## [8.3.0] - 2019-01-25
### Added
- Added SimplSharpProMono to eRuntimeEnvironment enum

View File

@@ -28,6 +28,16 @@ namespace ICD.Common.Utils.Json
return DateTime.Parse(data);
}
/// <summary>
/// Gets the data as a DateTime value.
/// </summary>
/// <param name="data"></param>
/// <returns></returns>
public static DateTime ParseDateTime(string data)
{
return DateTime.Parse(data);
}
/// <summary>
/// Gets the token as a DateTime value.
/// </summary>
@@ -61,6 +71,10 @@ namespace ICD.Common.Utils.Json
output = ParseDateTime(token);
return true;
}
catch (FormatException)
{
return false;
}
catch (InvalidCastException)
{
return false;