From 288bb9622d4dbfde52833e57940175277c6de921 Mon Sep 17 00:00:00 2001 From: Martin Costello Date: Thu, 13 Aug 2020 21:56:08 +0100 Subject: [PATCH] Fix test that fails on machine using en-GB (#24704) Fix test that fails due to the month and date being swapped when run on a machine configured to use UK English. --- .../test/Internal/Protocol/JsonHubProtocolTestsBase.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/SignalR/common/SignalR.Common/test/Internal/Protocol/JsonHubProtocolTestsBase.cs b/src/SignalR/common/SignalR.Common/test/Internal/Protocol/JsonHubProtocolTestsBase.cs index 6534bf8805..a6dbff80c1 100644 --- a/src/SignalR/common/SignalR.Common/test/Internal/Protocol/JsonHubProtocolTestsBase.cs +++ b/src/SignalR/common/SignalR.Common/test/Internal/Protocol/JsonHubProtocolTestsBase.cs @@ -4,6 +4,7 @@ using System; using System.Buffers; using System.Collections.Generic; +using System.Globalization; using System.IO; using System.Linq; using System.Text; @@ -310,7 +311,7 @@ namespace Microsoft.AspNetCore.SignalR.Common.Tests.Internal.Protocol IntProp = 43, DoubleProp = 3.14159, StringProp = "test", - DateTimeProp = DateTime.Parse("6/3/2019 10:00:00 PM") + DateTimeProp = DateTime.Parse("6/3/2019 10:00:00 PM", CultureInfo.InvariantCulture) }, streamItemMessage.Item); }