Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove explicit calls to init #793

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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