有誰知道如何打印位置結束時的時間?下面的代碼打印出完整的位置時:CLLocation GeoFire位置時間
有在結果的時間之間的時間差,而印刷出來的位置和時間location?.timestamp
可選:
geofire?.setLocation(location, forKey: uid) { (error) in
if (error != nil) {
print("An error occured: \(error)")
} else {
print(location)
結果:可選( < + xx.xxxxxx,+ xx.xxxxxxxx> +/-5.00米(速度0.00 MPS /當然-1.00)@ 21/11/2016,16時04分32秒中歐標準時間)
和僅打印:
print(location?.timestamp)
結果:可選(2016年11月21日15時04分32秒+0000)
如何打印唯一的 「16點04分32秒中歐標準時間」 甚至與「中歐標準時間」21/11/2016,16:04:32之前的日期?謝謝
的可能的複製[斯威夫特 - IOS - 日期和時間以不同的格式(http://stackoverflow.com/questions/28489227/swift-ios-dates-and-times-in - 不同格式) – xoudini