ios - List of timezone abbreviations using xcode -
I have obtained a list of all time zones using this function and stored them in an array: / p>
Time zoneAllems = [NSTimeZone knownTimeZoneNames]; I want to get a list of summaries, for example: GMT + 1 â ?? | Is there any easy and quick way to do this? Many thanks
Edit 1: This solution shows time zone like: Asia / Beirut â ?? | So I need to show the GMT + 2 label instead.
try it, < Previous> NSMutableArray * timeZoneArray = [[NSMutableArray alloc] initWithArray: [NSTimeZone knownTimeZoneNames]]; NSMutableArray * abbreviationArray = [[NSMutableArray alloc] init]; (Int count = 0; count & lt; [timeZoneArray count] -1; calculation = counting + 1) {[abbreviationArray addObject: [[NSTimeZone Time ZoneWithName: [Timezoneer Objective Index: Count]] Short name]]; } NSLog (@ "abbreviated:% @", brief Array);
Comments
Post a Comment