Skip to content

Commit

Permalink
fix(text formatters): write timestamp in utc
Browse files Browse the repository at this point in the history
Fixes #220
  • Loading branch information
FantasticFiasco committed Nov 7, 2021
1 parent c6f38e6 commit 6c84238
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ private void FormatContent(LogEvent logEvent, TextWriter output)
if (output == null) throw new ArgumentNullException(nameof(output));

output.Write("{\"Timestamp\":\"");
output.Write(logEvent.Timestamp.ToString("o"));
output.Write(logEvent.Timestamp.UtcDateTime.ToString("o"));

output.Write("\",\"Level\":\"");
output.Write(logEvent.Level);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ private void FormatContent(LogEvent logEvent, TextWriter output)
if (output == null) throw new ArgumentNullException(nameof(output));

output.Write("{\"Timestamp\":\"");
output.Write(logEvent.Timestamp.ToString("o"));
output.Write(logEvent.Timestamp.UtcDateTime.ToString("o"));

output.Write("\",\"Level\":\"");
output.Write(logEvent.Level);
Expand Down

0 comments on commit 6c84238

Please sign in to comment.