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
On Linux, calling isValidDate on a DateComponents instance unexpectedly returns false if the timeZone property of the DateComponents instance is different than the timeZone property of its calendar.
Similarly, calling isValidDate(in: ) on a DateComponents instance unexpectedly returns false if the timeZone property of the DateComponents instance is different than the timeZone property of the specified calendar.
This is unexpected because:
it is inconsistent with Swift 5.0 on Linux
it is inconsistent with Swift on macOS (both Swift 5.0 and 5.1)
the API doc states: "If the time zone property is set in the DateComponents, it is used."
Environment
Swift version 5.1 (swift-5.1-RELEASE) Target: x86_64-unknown-linux-gnu
Additional Detail from JIRA
md5: f531eee5421fbcfa182ed29258a82bb9
Issue Description:
On Linux, calling
isValidDate
on aDateComponents
instance unexpectedly returns false if thetimeZone
property of theDateComponents
instance is different than thetimeZone
property of itscalendar
.Similarly, calling
isValidDate(in: )
on aDateComponents
instance unexpectedly returns false if thetimeZone
property of theDateComponents
instance is different than thetimeZone
property of the specifiedcalendar
.This is unexpected because:
it is inconsistent with Swift 5.0 on Linux
it is inconsistent with Swift on macOS (both Swift 5.0 and 5.1)
the API doc states: "If the time zone property is set in the DateComponents, it is used."
Steps to reproduce
Expected output (and output on macOS)
Actual output (Linux)
Environment
Linux (exhibits the problem):
Ubuntu 18.04 server
Swift version 5.1 (swift-5.1-RELEASE) Target: x86_64-unknown-linux-gnu
macOS (does not exhibit the problem):
macOS 10.14.6
Apple Swift version 5.1 (swiftlang-1100.0.270.13 clang-1100.0.33.7)
Target: x86_64-apple-darwin18.7.0
The text was updated successfully, but these errors were encountered: