iPhone:NSDate 将 GMT 转换为当地时间
目前,我有一个 API 调用返回一个日期/时间,格式如下:2010-10-10T07:54:01.878926
我可以假设这是 GMT 吗?我还将其转换为 NSDate 对象。有没有办法使用iPhone本地时间重新计算时间?
I currently have an API call returning me a date/time in the format: 2010-10-10T07:54:01.878926
Can I assume this is GMT? I also converted this to an NSDate object. Is there a way to use the local iPhone time to recalculate the time?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
此代码会将 GMT 时间转换为设备的本地时间。
This code will convert the GMT time to the device's local time.