From bead97272712a31ef87cdd259c50dd9c80b9de4e Mon Sep 17 00:00:00 2001 From: David Barrett <39411621+David-Barrett-MS@users.noreply.github.com> Date: Fri, 8 Jul 2022 16:44:22 +0100 Subject: [PATCH] Update EwsUtilities.cs Change the Time attribute in the trace tag to format "O" from "u", so that we capture fractions of a second too. Without this, we need to analyze the headers of the responses to get this information. This is important when tracing applications that can generate hundreds of requests in the same second. --- Core/EwsUtilities.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Core/EwsUtilities.cs b/Core/EwsUtilities.cs index 2076f36b..dd9dcbbd 100644 --- a/Core/EwsUtilities.cs +++ b/Core/EwsUtilities.cs @@ -406,7 +406,7 @@ private static void WriteTraceStartElement( writer.WriteStartElement("Trace"); writer.WriteAttributeString("Tag", traceTag); writer.WriteAttributeString("Tid", Thread.CurrentThread.ManagedThreadId.ToString()); - writer.WriteAttributeString("Time", DateTime.UtcNow.ToString("u", DateTimeFormatInfo.InvariantInfo)); + writer.WriteAttributeString("Time", DateTime.UtcNow.ToString("O", DateTimeFormatInfo.InvariantInfo)); if (includeVersion) { @@ -1603,4 +1603,4 @@ internal static void ForEach(this IEnumerable collection, Action action } #endregion } -} \ No newline at end of file +}