diff --git a/CHANGELOG.md b/CHANGELOG.md index 1c5205d..409aa23 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/ICD.Common.Utils/Json/JsonUtils.cs b/ICD.Common.Utils/Json/JsonUtils.cs index 903c271..3d0eefc 100644 --- a/ICD.Common.Utils/Json/JsonUtils.cs +++ b/ICD.Common.Utils/Json/JsonUtils.cs @@ -28,6 +28,16 @@ namespace ICD.Common.Utils.Json return DateTime.Parse(data); } + /// + /// Gets the data as a DateTime value. + /// + /// + /// + public static DateTime ParseDateTime(string data) + { + return DateTime.Parse(data); + } + /// /// Gets the token as a DateTime value. /// @@ -61,6 +71,10 @@ namespace ICD.Common.Utils.Json output = ParseDateTime(token); return true; } + catch (FormatException) + { + return false; + } catch (InvalidCastException) { return false;