mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-01-15 15:48:03 +00:00
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.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user