Skip to content

Commit

Permalink
Remove calls to init
Browse files Browse the repository at this point in the history
SwiftDate/malcommac#793
  • Loading branch information
Sam-Spencer committed Apr 11, 2024
1 parent d3df770 commit 45b3b76
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Tests/SwiftDateTests/TestSwiftDate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 45b3b76

Please sign in to comment.