如何在 Swift 中获取纪元的秒数?
您可以简单地使用 NSDate 的timeIntervalSince1970功能。
timeIntervalSince1970
let timeInterval = NSDate().timeIntervalSince1970