NSDateFormatter doesn't show abbreviation for
| Originator: | heath.borders | ||
| Number: | rdar://10783042 | Date Originated: | 31-Jan-2012 12:47 PM |
| Status: | Closed | Resolved: | |
| Product: | iPad SDK | Product Version: | 5.0 |
| Classification: | Other Bug | Reproducible: | Always |
Summary: On iOS5 simulator and device, NSDateFormatter doesn't show time zone abbreviation for "Asia/Kolkata" for the "z" or "zzz" specifier. Steps to Reproduce: NSTimeZone *timeZone = [NSTimeZone timeZoneWithName:@"Asia/Kolkata"]; NSDateFormatter *dateFormatter = [[[NSDateFormatter alloc] init] autorelease]; dateFormatter.dateFormat = @"z"; // or @"zzz" dateFormatter.timeZone = timeZone; NSLog(@"date string: %@", [dateFormatter stringFromDate:[NSDate date]]); // "GMT+05:30", expected "IST" NSLog(@"time zone abbreviation: %@", [timeZone abbreviationForDate:[NSDate date]]); // "IST" Expected Results: IST IST Actual Results: GMT+05:30 IST
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!
Closed as duplicate of 7251267
This problem is duplicate of
ID, State
7251267,Closed
Duped as 10972656