Can I get the time zone as we get the watch app on iphone

Can we get a time zone similar to that shown in the watch app? I get a taxonomic array as follows:

NSDictionary *TimeZoneArray = [NSTimeZone abbreviationDictionary]; 

Through this I get an array for the continent, now I get data like: Asia/Kabul,Asia/Muscat,Asia/Kuala_Lumpur,Asia/Hong_Kong , but I need data like this: Asia/India/Delhi, Asia/India/Kolkata,Asia/India/Mumbai .

Hope I understood my question.

What I want is the name of the continent with the name of the country, and then the name of the city.

+4
source share
3 answers

Possible solution: /System/Library/PrivateFrameworks/AppSupport.framework/all_cities_adj.plist. We can get data from this plist.

Source Where date and time iPhone gets its list of time zones

+1
source

Try the following:

 NSLog(@"Timezone is %@", [NSTimeZone systemTimeZone].name); 

You need to parse the response string, but this should be pretty trivial.

+3
source

here is the new one:

 /System/Library/PreferencePanes/DateAndTime.prefPane/Contents/Resources/TimeZone.prefPane/Contents/Resources/all_cities_adj.plist 
0
source

All Articles