Get the similar timezone list as in iphone Settings app

前端 未结 3 1537
面向向阳花
面向向阳花 2021-02-04 21:50

I am able to get list of timezones using

NSArray *timezoneNames = [NSTimeZone knownTimeZoneNames] ;

but the generated list of timezones does no

3条回答
  •  不要未来只要你来
    2021-02-04 21:59

    Firstly you need to download the .csv file which will provide you country/cities/timezone/region. Using this file we can display the list of countries and their cities. When user select any city we need to map it with the respected country and then this country needs to be map with device's timezones([NSTimeZone knownTimeZoneNames];).

    This link also might be useful in this regard:

    Get timezone by Country and Region

提交回复
热议问题