From 33304653378406ecc0b2b89413e4c6296fdcedde Mon Sep 17 00:00:00 2001 From: Shane Powell Date: Sat, 31 May 2025 10:41:26 +1200 Subject: [PATCH] Fix failing unit tests on machines where the local timezone offset is far enough away from the test data day to be off by a day. Change the test startdate to specifically be utc instead of local machine timezone. --- .../Listings/XmlTvListingsProviderTests.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Jellyfin.LiveTv.Tests/Listings/XmlTvListingsProviderTests.cs b/tests/Jellyfin.LiveTv.Tests/Listings/XmlTvListingsProviderTests.cs index 0fb7894e51..332658f674 100644 --- a/tests/Jellyfin.LiveTv.Tests/Listings/XmlTvListingsProviderTests.cs +++ b/tests/Jellyfin.LiveTv.Tests/Listings/XmlTvListingsProviderTests.cs @@ -54,7 +54,7 @@ public class XmlTvListingsProviderTests Path = path }; - var startDate = new DateTime(2022, 11, 4); + var startDate = new DateTime(2022, 11, 4, 0, 0, 0, 0, DateTimeKind.Utc); var programs = await _xmlTvListingsProvider.GetProgramsAsync(info, "3297", startDate, startDate.AddDays(1), CancellationToken.None); var programsList = programs.ToList(); Assert.Single(programsList); @@ -78,7 +78,7 @@ public class XmlTvListingsProviderTests Path = path }; - var startDate = new DateTime(2022, 11, 4); + var startDate = new DateTime(2022, 11, 4, 0, 0, 0, DateTimeKind.Utc); var programs = await _xmlTvListingsProvider.GetProgramsAsync(info, "3297", startDate, startDate.AddDays(1), CancellationToken.None); var programsList = programs.ToList(); Assert.Single(programsList);