You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Sources/FoundationEssentials/Calendar/Calendar_Gregorian.swift
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1475,9 +1475,10 @@ internal final class _CalendarGregorian: _CalendarProtocol, @unchecked Sendable
1475
1475
// MARK:
1476
1476
1477
1477
func date(from components:DateComponents)->Date?{
1478
+
// If the components specifies a new time zone, perform this calculation using the specified timezone
1478
1479
// If the date falls into the skipped time frame when transitioning into DST (e.g. 1:00 - 3:00 AM for PDT), we want to treat it as if DST hasn't happened yet. So, use .former for dstRepeatedTimePolicy.
1479
1480
// If the date falls into the repeated time frame when DST ends (e.g. 1:00 - 2:00 AM for PDT), we want the first instance, i.e. the instance before turning back the clock. So, use .former for dstSkippedTimePolicy.
0 commit comments