0

I have a code like this:

[dateFormat setDateFormat:@"HH:mm"];
dateHM = [dateFormat stringFromDate:date];

I use dateHM (NSString) in stringWithFormat:, and i expected to always have it displayed as for example 23:00, not 11:00. It works right almost every time, but some app users are getting 12-hours format with AM/PM added...

How is that possible? Does global user preferences make a difference, or what?

4

1 回答 1

1

NSLocale阅读此 Apple技术说明,了解有关日期格式化程序及其交互方式的所有信息。

于 2013-08-08T15:05:21.980 回答