I would like to set the 12 hour clock format for my entire iPhone application irrespective of whether the user has set the iPhone device clock format to 12 hrs or 24 hrs. Please advise as to how this can be achieved.
A:
I set the locale of my NSDateFormatter object to en_US and that does the trick for presenting the time in 12 hour format.
NSLocale *uslocale = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US"];
[dateFormatterForDisplay setLocale:uslocale];
[uslocale release];
Hetal Vora
2010-05-12 05:40:57