NSDateFormater mysql“风格”日期格式
我从我的网络应用程序获取日期和时间,格式为:
2012-02-23T23:25:22Z
我尝试使用不同的格式但没有成功。
[dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss z"];
如何设置 NSDateFormater 将此字符串放入 NSDate 中?
I'm getting from my webapp date and time in format:
2012-02-23T23:25:22Z
I tried with different formats but without success.
[dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss z"];
How to setup NSDateFormater to get this string into NSDate?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
已更新
但是你的 Z 在这里代表什么..我想这不是时区
Updated
But what your Z represents here.. I suppose it's not a timezone
您正在使用 RFC3339 日期时间。
Apple 使用此 推荐:
You are using an RFC3339 date time.
Apple uses this recommendation: