From c460fcca9f221671a4b00c9841cb8d3ba2cee06e Mon Sep 17 00:00:00 2001 From: "kwan.nguyen" Date: Tue, 7 Jan 2025 09:21:34 +0700 Subject: [PATCH] fix display time in correct timezone --- PCUT/PCUT/Converters/LogTimestampConverter.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PCUT/PCUT/Converters/LogTimestampConverter.cs b/PCUT/PCUT/Converters/LogTimestampConverter.cs index ae32870..e602225 100644 --- a/PCUT/PCUT/Converters/LogTimestampConverter.cs +++ b/PCUT/PCUT/Converters/LogTimestampConverter.cs @@ -11,7 +11,7 @@ namespace PCUT.Converters { case DateTime timeValue: { - return $"[{timeValue.ToString("yyyy-MM-dd HH:mm:ss.fff K")}]"; + return $"[{TimeZoneInfo.ConvertTime(timeValue, TimeZoneInfo.Local).ToString("yyyy-MM-dd HH:mm:ss")}]"; } default: return string.Empty;