Get Updates By E-mail 

Article Written By:
Johann Dowa

iOS Library Allowing You To Find The Time Zone Of A Location Without Using A Web Service

In order to find the time zone for a location you can use web services API’s such as the Google Maps API’s time zone API. Unfortunately this requires you to query a remote service and you are subject to their limits.

Here’s a library rom Alterplay called APTimeZones that allows you to extract an NSTimeZone from a given location without the need to connect to a remote service. APTimeZones works by querying a local listing of time zones (included with the library).

This example from the readme shows how to get an NSTimeZone from APTimeZones by supplying the location:

//Ukraine location
CLLocation *location = [[CLLocation alloc] initWithLatitude:50.449846

NSTimeZone *timeZone = [[APTimeZones sharedInstance] timeZoneWithLocation:location];
NSLog(@"%@", timeZone);

You can find APTimeZones on Github here.

A nice and easy way to get the time zone for a location.

Submit A Resource

Have you created a useful tutorial, library or tool for iOS development that you would like to get in front of our 300,000+ monthly page views from iOS developers?

You can submit the url here.

The resources we feel will appeal to our readers the most will be posted on the front page.