将firebase时间戳转换为nsdate

时间:2018-02-06 06:57:30

标签: ios firebase google-cloud-firestore

我正在尝试将firebase时间戳转换为NSDate,但一直无法做到这一点。我的代码如下: -

if let serverTimestamp = document.data()[kSessionTimeStamp] as? TimeInterval{
    debugPrint(value)
}

它不打印它,但当我解析为[String:Any]时,它成功解析了它。但字典不包含任何时间戳。我正在使用firestore。

0 个答案:

没有答案
相关问题