mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-02-16 13:15:07 +00:00
feat: GetUtcTime()
This commit is contained in:
committed by
Chris Cameron
parent
cff1ec8d7e
commit
38c24d42a7
@@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
### Added
|
||||||
|
- IcdEnvironment.GetUtcTime() to get UTC representaiton of current time.
|
||||||
|
|
||||||
## [9.9.0] - 2019-09-16
|
## [9.9.0] - 2019-09-16
|
||||||
### Added
|
### Added
|
||||||
- Added a method for converting 24 hour to 12 hour format
|
- Added a method for converting 24 hour to 12 hour format
|
||||||
|
|||||||
@@ -97,5 +97,15 @@ namespace ICD.Common.Utils
|
|||||||
|
|
||||||
OnProgramInitializationComplete.Raise(null);
|
OnProgramInitializationComplete.Raise(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets UTC time
|
||||||
|
/// Uses GetLocalTime so Crestron Env will have ms percision
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static DateTime GetUtcTime()
|
||||||
|
{
|
||||||
|
return GetLocalTime().ToUniversalTime();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user