在模拟器中:
"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/