Get Timezone/country from iPhone

后端 未结 3 582
旧巷少年郎
旧巷少年郎 2020-12-06 00:03

Is there anyway to tell which timezone/country the phone is located in? I would prefer not to use location services.

The purpose of this is to automatically route c

3条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-06 00:18

        NSTimeZone *timeZoneLocal = [NSTimeZone localTimeZone];
        NSString *strTimeZoneName = [timeZoneLocal name];
    
        or
    
        NSTimeZone *timeZoneLocal = [NSTimeZone defaultTimeZone];
        NSString *strTimeZoneName = [timeZoneLocal name];
    

提交回复
热议问题