Storing log time in UTC format

This commit is contained in:
Chris Cameron
2017-09-11 12:54:23 -04:00
parent c3451d62b0
commit 3dc7f3bf78

View File

@@ -17,11 +17,16 @@ namespace ICD.Common.Services.Logging
#region Properties
/// <summary>
/// Accessor only for timestamp.
/// Gets the log time in UTC.
/// </summary>
[PublicAPI]
public DateTime Timestamp { get { return m_Timestamp; } }
/// <summary>
/// Gets the log time in local time.
/// </summary>
public DateTime LocalTimestamp { get { return Timestamp.ToLocalTime(); } }
/// <summary>
/// Get/Set for severity level.
/// </summary>
@@ -45,7 +50,7 @@ namespace ICD.Common.Services.Logging
{
m_Severity = severity;
m_Message = message;
m_Timestamp = IcdEnvironment.GetLocalTime();
m_Timestamp = IcdEnvironment.GetLocalTime().ToUniversalTime();
}
#endregion