Skip to content

Commit

Permalink
Try to fix test case failure in MacOs for Monitor
Browse files Browse the repository at this point in the history
  • Loading branch information
msJinLei committed Oct 10, 2024
1 parent 547f20e commit ac2a120
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/Monitor/Monitor/OutputClasses/CustomPrinter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@

using System;
using System.Collections;
using System.Globalization;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Text.RegularExpressions;
using System.Xml;

namespace Microsoft.Azure.Commands.Insights.OutputClasses
Expand Down Expand Up @@ -71,7 +73,14 @@ private static void Print(object obj, string name, string currentIndent, StringB
sb.Append(currentIndent);
sb.Append(name);
sb.Append(" : ");
sb.AppendLine(obj.ToString());
if (obj is DateTime dateTime)
{
sb.AppendLine(dateTime.ToString("D", new CultureInfo("en-US")));
}
else
{
sb.AppendLine(obj.ToString());
}
return;
}

Expand Down

0 comments on commit ac2a120

Please sign in to comment.