let date = Date()
let zone = NSTimeZone.local
let interval: NSInteger = zone.secondsFromGMT(for: date)
let now = date.addingTimeInterval(TimeInterval(interval))
print(date, now)
let date = Date()
let zone = NSTimeZone.local
let interval: NSInteger = zone.secondsFromGMT(for: date)
let now = date.addingTimeInterval(TimeInterval(interval))
print(date, now)
本文标题:Date 时差8小时解决方法
本文链接:https://www.haomeiwen.com/subject/stcmnftx.html
网友评论