有谁知道如何打印位置结束时的时间?下面的代码打印出完整的位置时: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