1
(lldb) po Date(timeIntervalSince1970: TimeInterval(0))
▿ 1970-01-01 00:00:00 +0000
- timeIntervalSinceReferenceDate : -978307200.0
(lldb) po Date(timeIntervalSince1970: TimeInterval(0))!
▿ 1970-01-01 00:00:00 +0000
- timeIntervalSinceReferenceDate : -978307200.0
Fix-it applied, fixed expression was:
Date(timeIntervalSince1970: TimeInterval(0))
爲什麼TimeInterval(0)
需要修復?我知道零表示1970-1-1,而init(timeIntervalSince1970:)
不返回一個可選的日期一樣init?(xxx:)
:「Fix-it applied,fixed expression was:」是什麼意思?
/// Returns a `Date` initialized relative to 00:00:00 UTC on 1 January 1970 by a given number of seconds.
public init(timeIntervalSince1970: TimeInterval)