From addd3c362b1e794345f349558732a729a4f51fbf Mon Sep 17 00:00:00 2001 From: Drew Noakes Date: Thu, 12 Oct 2023 08:34:03 +1100 Subject: [PATCH] Ensure warning message uses local time Fixes #9279 When incremental build failure detection is enabled, we can log a warning that includes paths and timestamps. However if FUTDC logging is disabled, the conversion from UTC to local time could be bypassed, making the log message harder to understand and potentially misleading (as there's no mention of UTC in the message). This change fixes that issue by ensuring any times are converted to local time prior to being displayed. --- .../ProjectSystem/VS/UpToDate/BuildUpToDateCheck.Log.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/ProjectSystem/VS/UpToDate/BuildUpToDateCheck.Log.cs b/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/ProjectSystem/VS/UpToDate/BuildUpToDateCheck.Log.cs index ce41300b38c..6f4fb77479c 100644 --- a/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/ProjectSystem/VS/UpToDate/BuildUpToDateCheck.Log.cs +++ b/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/ProjectSystem/VS/UpToDate/BuildUpToDateCheck.Log.cs @@ -209,6 +209,8 @@ public bool Fail(string reason, string resourceName, params object[] values) }); // Remember the failure reason and description for use in IncrementalBuildFailureDetector. + // First, ensure times are converted to local time (in case logging is not enabled). + ConvertToLocalTimes(values); FailureReason = reason; FailureDescription = string.Format(GetResourceString(resourceName), values);