diff --git a/Tests/SwiftDateTests/TestSwiftDate.swift b/Tests/SwiftDateTests/TestSwiftDate.swift index 49ddc057..b8daf87a 100644 --- a/Tests/SwiftDateTests/TestSwiftDate.swift +++ b/Tests/SwiftDateTests/TestSwiftDate.swift @@ -31,12 +31,12 @@ class TestSwiftDate: XCTestCase { // DO NOT recognized the right timezone // The timezone should be UTC let wrongZone = "2020-03-13T05:40:48.000Z" - let wrongZoneDate = Date.init(wrongZone) + let wrongZoneDate = Date(wrongZone) print(wrongZoneDate!.description) XCTAssert("2020-03-13 05:40:48 +0000" == wrongZoneDate!.description) let iso8601Time = "2020-03-13T05:40:48+00:00" - let iso8601Date = Date.init(iso8601Time) + let iso8601Date = Date(iso8601Time) print(iso8601Date!.description) XCTAssert("2020-03-13 05:40:48 +0000" == iso8601Date!.description) }