【发布时间】:2012-09-22 01:59:42
【问题描述】:
可能重复:
Converting an ISO 8601 timestamp into an NSDate: How does one deal with the UTC time offset?
我正在编写一个 iPhone 应用程序,它利用 Ruby on Rails Web 服务带来了时间。 我从 JSON 响应中获得的时间字符串具有以下格式。 “2012-12-01T01:01:00Z” 我想从中获取基于系统时区的时间。 我该怎么办?
【问题讨论】:
-
这是由 ISO 8601 (en.wikipedia.org/wiki/ISO_8601) 指定的格式。看看stackoverflow.com/q/5185230/684934 或stackoverflow.com/q/7925038/684934。
标签: iphone ruby-on-rails-3.1 nsdateformatter nstimezone