ios - [sender.date descriptionWithLocale :[NSLocale currentLocale]] gives different result?

标签 ios iphone ios-simulator

在模拟器中:

"Sunday, July 20, 2014 at 7:00:42 PM Singapore Standard Time"

在实际设备中:

"Sunday, 20 July, 2014 7:16:44 pm Singapore Standard Time"

为什么????

最佳答案

模拟器使用您 Mac 的区域设置,该区域设置可能与您设备上的区域设置不同。特别是,Mac OS X 允许在“语言和区域”系统首选项 Pane 中对区域设置进行更大程度的自定义。

即使它们都设置为相同的值,也不能保证输出相同。

关于ios - [sender.date descriptionWithLocale :[NSLocale currentLocale]] gives different result?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24849056/

相关文章:

ios - 强制 View Controller 重新加载以刷新 UIAppearance 更改

iphone - 使用 GZIP 或 deflate 在 objective-c (iphone) 中压缩/解压缩 NSString

Xcode 连接到模拟器时出错 "Software caused connection abort"

iphone - 如何以编程方式在 iOS 应用程序中显示目标的版本/内部版本号?

iphone - iOS KeychainItemWrapper 中的内存泄漏

ios - Estimote Beacon 加速度计更新时间

iphone - iPhone 版 MPMoviePlayerController 中的隐藏式字幕

ios - 在 iTunes 中更新后的相同应用程序

ios - 关闭应用程序后保存的文件不再存在

ios - 无法实例化名为 GLKView 的类