Skip to content

Commit d3b128f

Browse files
committed
Avoid relying on default timezone
1 parent 89ec163 commit d3b128f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Tests/FoundationEssentialsTests/GregorianCalendarRecurrenceRuleTests.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -542,6 +542,7 @@ private struct GregorianCalendarRecurrenceRuleTests {
542542

543543
@Test func yearlyRecurrenceWithWeekNumberExpansion() {
544544
var calendar = Calendar(identifier: .gregorian)
545+
calendar.timeZone = .gmt
545546
calendar.firstWeekday = 2 // Week starts on Monday
546547
calendar.minimumDaysInFirstWeek = 4
547548

@@ -569,6 +570,7 @@ private struct GregorianCalendarRecurrenceRuleTests {
569570

570571
@Test func yearlyRecurrenceWithWeekNumberExpansionCountingBack() {
571572
var calendar = Calendar(identifier: .gregorian)
573+
calendar.timeZone = .gmt
572574
calendar.firstWeekday = 2 // Week starts on Monday
573575

574576
let start = Date(timeIntervalSince1970: 1704117600.0) // 2024-01-01T14:00:00-0000

0 commit comments

Comments
 (0)