On iOS 5 (simulator and device), when I tried to parse a date string with timezone ICT, it just returns (null). One strange thing is that this timezone used to work fine in iOS4.3.
NSString *inputDateStr = @"Fri, 06 Apr 2012 13:00:00 ICT";
NSDateFormatter *df = [[NSDateFormatter alloc] init];
[df setDateFormat:@"EEE, dd MMM yyyy HH:mm:ss zzz"];
NSDate *inputDate = [df dateFromString:inputDateStr];
NSLog(@"--- INPUT %@ -> %@ ---",inputDateStr, inputDate);
--- INPUT Fri, 06 Apr 2012 13:00:00 ICT -> (null) ---
But when I tried other timezone, like PST, it works !?
NSString *inputDateStr = @"Fri, 06 Apr 2012 13:00:00 PST";
--- INPUT Fri, 06 Apr 2012 13:00:00 PST -> 2012-04-06 21:00:00 +0000 ---
I printed out [NSTimeZone abbreviationDictionary] and still see ICT in there. So this timezone should be still valid. So, why do I get (null)?
Time zone names are locale specific and can mean something else in different languages or not exist at all.
eg.
Use GMT+XX for a stable functionality.
EDIT:
See this link for more information about time zones: http://unicode.org/repos/cldr/trunk/docs/web/tr35.html#Time_Zone_Fallback
Note the section is called “Time Zone Display Names”. These names were never intented to be used for parsing. They are meant to be displayed (e.g. as the result of the ZZZ pattern).