diff --git a/ICD.Common.Utils/IcdEnvironment.SimplSharp.cs b/ICD.Common.Utils/IcdEnvironment.SimplSharp.cs index 39dcf48..3b7aad2 100644 --- a/ICD.Common.Utils/IcdEnvironment.SimplSharp.cs +++ b/ICD.Common.Utils/IcdEnvironment.SimplSharp.cs @@ -1,4 +1,5 @@ -#if SIMPLSHARP +using ICD.Common.Utils.Extensions; +#if SIMPLSHARP using System; using System.Collections.Generic; using Crestron.SimplSharp; @@ -198,6 +199,8 @@ namespace ICD.Common.Utils (ushort)localTime.Month, (ushort)localTime.Day, (ushort)localTime.Year); + + OnSystemDateTimeChanged.Raise(null); } public static eEthernetEventType GetEthernetEventType(Crestron.SimplSharp.eEthernetEventType type) diff --git a/ICD.Common.Utils/IcdEnvironment.Standard.cs b/ICD.Common.Utils/IcdEnvironment.Standard.cs index 62d607c..62274a6 100644 --- a/ICD.Common.Utils/IcdEnvironment.Standard.cs +++ b/ICD.Common.Utils/IcdEnvironment.Standard.cs @@ -86,6 +86,8 @@ namespace ICD.Common.Utils localTime.ToString("s")); #else throw new NotSupportedException(); + + OnSystemDateTimeChanged.Raise(null); #endif } diff --git a/ICD.Common.Utils/IcdEnvironment.cs b/ICD.Common.Utils/IcdEnvironment.cs index 1804ed5..9ab155f 100644 --- a/ICD.Common.Utils/IcdEnvironment.cs +++ b/ICD.Common.Utils/IcdEnvironment.cs @@ -62,6 +62,11 @@ namespace ICD.Common.Utils /// public static event EventHandler OnProgramInitializationComplete; + /// + /// Raised when the system date/time has been set. + /// + public static event EventHandler OnSystemDateTimeChanged; + private static readonly SafeCriticalSection s_ProgramInitializationSection = new SafeCriticalSection(); private static bool s_ProgramInitializationComplete;