1
0
mirror of https://github.com/oliverbooth/X10D synced 2024-11-09 22:55:42 +00:00

fix(test): fix incorrect date being returned for .NET Standard 2.1

This commit is contained in:
Oliver Booth 2023-04-01 18:20:44 +01:00
parent 5714ef73c1
commit 1acee3bf72
No known key found for this signature in database
GPG Key ID: 20BEB9DC87961025

View File

@ -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]