diff --git a/src/Marten.NodaTime.Testing/TestData/TargetWithDates.cs b/src/Marten.NodaTime.Testing/TestData/TargetWithDates.cs index f54cf802860..eacdee75e2c 100644 --- a/src/Marten.NodaTime.Testing/TestData/TargetWithDates.cs +++ b/src/Marten.NodaTime.Testing/TestData/TargetWithDates.cs @@ -10,6 +10,7 @@ public class TargetWithDates: IEquatable public DateTime? NullableDateTime { get; set; } public DateTimeOffset DateTimeOffset { get; set; } public DateTimeOffset? NullableDateTimeOffset { get; set; } + public DateTimeZone DateTimeZone { get; set; } public LocalDate LocalDate { get; set; } public LocalDate? NullableLocalDate { get; set; } @@ -23,6 +24,7 @@ internal static TargetWithDates Generate(DateTime? defaultDateTime = null) var dateTime = defaultDateTime ?? DateTime.UtcNow; var localDateTime = LocalDateTime.FromDateTime(dateTime); var instant = Instant.FromDateTimeUtc(dateTime.ToUniversalTime()); + var timeZone = DateTimeZoneProviders.Tzdb["Etc/UTC"]; return new TargetWithDates { @@ -33,6 +35,7 @@ internal static TargetWithDates Generate(DateTime? defaultDateTime = null) NullableDateTimeOffset = dateTime, LocalDate = localDateTime.Date, NullableLocalDate = localDateTime.Date, + DateTimeZone = timeZone, LocalDateTime = localDateTime, NullableLocalDateTime = localDateTime, InstantUTC = instant, @@ -51,6 +54,7 @@ public bool Equals(TargetWithDates other) && NullableDateTime == other.NullableDateTime && DateTimeOffset == other.DateTimeOffset && NullableDateTimeOffset == other.NullableDateTimeOffset + && DateTimeZone == other.DateTimeZone && LocalDate == other.LocalDate && NullableLocalDate == other.NullableLocalDate && LocalDateTime == other.LocalDateTime