From dc96c0867ddeb124a684c2e0f9262dccb196a909 Mon Sep 17 00:00:00 2001 From: Jason Dove <1695733+jasongdove@users.noreply.github.com> Date: Tue, 4 Nov 2025 20:14:01 -0600 Subject: [PATCH] use tzconvert for time zones in tests --- .../Scheduling/BlockScheduling/EffectiveBlockTests.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ErsatzTV.Core.Tests/Scheduling/BlockScheduling/EffectiveBlockTests.cs b/ErsatzTV.Core.Tests/Scheduling/BlockScheduling/EffectiveBlockTests.cs index 366775a77..2fd373264 100644 --- a/ErsatzTV.Core.Tests/Scheduling/BlockScheduling/EffectiveBlockTests.cs +++ b/ErsatzTV.Core.Tests/Scheduling/BlockScheduling/EffectiveBlockTests.cs @@ -2,6 +2,7 @@ using ErsatzTV.Core.Domain.Scheduling; using ErsatzTV.Core.Scheduling.BlockScheduling; using NUnit.Framework; using Shouldly; +using TimeZoneConverter; namespace ErsatzTV.Core.Tests.Scheduling.BlockScheduling; @@ -123,7 +124,7 @@ public static class EffectiveBlockTests // In 2024, DST starts on March 10 for America/Chicago // For Windows, this would be "Central Standard Time" - var tz = TimeZoneInfo.FindSystemTimeZoneById("America/Chicago"); + var tz = TZConvert.GetTimeZoneInfo("America/Chicago"); var start = new DateTime(2024, 3, 9, 0, 0, 0, DateTimeKind.Unspecified); var dto = new DateTimeOffset(start, tz.GetUtcOffset(start)); @@ -162,7 +163,7 @@ public static class EffectiveBlockTests // In 2024, DST ends on Nov 3 for America/Chicago // For Windows, this would be "Central Standard Time" - var tz = TimeZoneInfo.FindSystemTimeZoneById("America/Chicago"); + var tz = TZConvert.GetTimeZoneInfo("America/Chicago"); var start = new DateTime(2024, 11, 2, 0, 0, 0, DateTimeKind.Unspecified); var dto = new DateTimeOffset(start, tz.GetUtcOffset(start));