From 1acee3bf7235b5c0e9b79533c53d120e72c75ec5 Mon Sep 17 00:00:00 2001 From: Oliver Booth Date: Sat, 1 Apr 2023 18:20:44 +0100 Subject: [PATCH] fix(test): fix incorrect date being returned for .NET Standard 2.1 --- X10D.Tests/src/Time/DateTimeOffsetTests.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/X10D.Tests/src/Time/DateTimeOffsetTests.cs b/X10D.Tests/src/Time/DateTimeOffsetTests.cs index cfc364e..971d58d 100644 --- a/X10D.Tests/src/Time/DateTimeOffsetTests.cs +++ b/X10D.Tests/src/Time/DateTimeOffsetTests.cs @@ -57,8 +57,9 @@ public class DateTimeOffsetTests public void FirstDayOfMonth_ShouldBe1st_GivenToday() { DateTimeOffset today = DateTime.UtcNow.Date; + var first = new DateTimeOffset(today.Year, today.Month, 1, 0, 0, 0, today.Offset); - Assert.AreEqual(new DateTime(today.Year, today.Month, 1), today.FirstDayOfMonth()); + Assert.AreEqual(first, today.FirstDayOfMonth()); } [TestMethod]