mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-02-16 13:15:07 +00:00
Storing log time in UTC format
This commit is contained in:
@@ -17,11 +17,16 @@ namespace ICD.Common.Services.Logging
|
|||||||
#region Properties
|
#region Properties
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Accessor only for timestamp.
|
/// Gets the log time in UTC.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[PublicAPI]
|
[PublicAPI]
|
||||||
public DateTime Timestamp { get { return m_Timestamp; } }
|
public DateTime Timestamp { get { return m_Timestamp; } }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the log time in local time.
|
||||||
|
/// </summary>
|
||||||
|
public DateTime LocalTimestamp { get { return Timestamp.ToLocalTime(); } }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get/Set for severity level.
|
/// Get/Set for severity level.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -45,7 +50,7 @@ namespace ICD.Common.Services.Logging
|
|||||||
{
|
{
|
||||||
m_Severity = severity;
|
m_Severity = severity;
|
||||||
m_Message = message;
|
m_Message = message;
|
||||||
m_Timestamp = IcdEnvironment.GetLocalTime();
|
m_Timestamp = IcdEnvironment.GetLocalTime().ToUniversalTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
Reference in New Issue
Block a user