diff --git a/CHANGELOG.md b/CHANGELOG.md index f6e518f..f8f548c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +### Added + - IcdEnvironment.GetUtcTime() to get UTC representaiton of current time. + ## [9.9.0] - 2019-09-16 ### Added - Added a method for converting 24 hour to 12 hour format diff --git a/ICD.Common.Utils/IcdEnvironment.cs b/ICD.Common.Utils/IcdEnvironment.cs index 9ab155f..630fa41 100644 --- a/ICD.Common.Utils/IcdEnvironment.cs +++ b/ICD.Common.Utils/IcdEnvironment.cs @@ -97,5 +97,15 @@ namespace ICD.Common.Utils OnProgramInitializationComplete.Raise(null); } + + /// + /// Gets UTC time + /// Uses GetLocalTime so Crestron Env will have ms percision + /// + /// + public static DateTime GetUtcTime() + { + return GetLocalTime().ToUniversalTime(); + } } }