From b22e53ca704d239fe1efce4d2034ce3afd9f7bdd Mon Sep 17 00:00:00 2001 From: Shawn Yuan Date: Mon, 12 May 2025 17:04:22 +0800 Subject: [PATCH] Resolve comments Signed-off-by: Shawn Yuan --- .../Helpers/TimeAndDateHelper.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.TimeDate/Helpers/TimeAndDateHelper.cs b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.TimeDate/Helpers/TimeAndDateHelper.cs index 13e675e111..18cd2b4d9f 100644 --- a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.TimeDate/Helpers/TimeAndDateHelper.cs +++ b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.TimeDate/Helpers/TimeAndDateHelper.cs @@ -167,7 +167,7 @@ internal static class TimeAndDateHelper if (DateTime.TryParse(input, out timestamp)) { // Known date/time format - Logger.LogInfo($"Successfully parsed standard date/time format: '{input}' as {timestamp}"); + Logger.LogDebug($"Successfully parsed standard date/time format: '{input}' as {timestamp}"); return true; } else if (Regex.IsMatch(input, @"^u[\+-]?\d+$")) @@ -186,7 +186,7 @@ internal static class TimeAndDateHelper } timestamp = DateTimeOffset.FromUnixTimeSeconds(secondsU).LocalDateTime; - Logger.LogInfo($"Successfully parsed unix timestamp: '{input}' as {timestamp}"); + Logger.LogDebug($"Successfully parsed unix timestamp: '{input}' as {timestamp}"); return true; } else if (Regex.IsMatch(input, @"^ums[\+-]?\d+$")) @@ -205,7 +205,7 @@ internal static class TimeAndDateHelper } timestamp = DateTimeOffset.FromUnixTimeMilliseconds(millisecondsUms).LocalDateTime; - Logger.LogInfo($"Successfully parsed unix millisecond timestamp: '{input}' as {timestamp}"); + Logger.LogDebug($"Successfully parsed unix millisecond timestamp: '{input}' as {timestamp}"); return true; } else if (Regex.IsMatch(input, @"^ft\d+$")) @@ -224,7 +224,7 @@ internal static class TimeAndDateHelper // DateTime.FromFileTime returns as local time. timestamp = DateTime.FromFileTime(secondsFt); - Logger.LogInfo($"Successfully parsed Windows file time: '{input}' as {timestamp}"); + Logger.LogDebug($"Successfully parsed Windows file time: '{input}' as {timestamp}"); return true; } else if (Regex.IsMatch(input, @"^oa[+-]?\d+[,.0-9]*$")) @@ -243,7 +243,7 @@ internal static class TimeAndDateHelper } timestamp = DateTime.FromOADate(oADate); - Logger.LogInfo($"Successfully parsed OLE Automation date: '{input}' as {timestamp}"); + Logger.LogDebug($"Successfully parsed OLE Automation date: '{input}' as {timestamp}"); return true; } else if (Regex.IsMatch(input, @"^exc[+-]?\d+[,.0-9]*$")) @@ -273,7 +273,7 @@ internal static class TimeAndDateHelper excDate = excDate <= 60 ? excDate + 1 : excDate; timestamp = DateTime.FromOADate(excDate); - Logger.LogInfo($"Successfully parsed Excel 1900 date value: '{input}' as {timestamp}"); + Logger.LogDebug($"Successfully parsed Excel 1900 date value: '{input}' as {timestamp}"); return true; } else if (Regex.IsMatch(input, @"^exf[+-]?\d+[,.0-9]*$")) @@ -293,7 +293,7 @@ internal static class TimeAndDateHelper } timestamp = DateTime.FromOADate(exfDate + 1462); - Logger.LogInfo($"Successfully parsed Excel 1904 date value: '{input}' as {timestamp}"); + Logger.LogDebug($"Successfully parsed Excel 1904 date value: '{input}' as {timestamp}"); return true; } else