Latest 0.4.3
License MIT
Platforms ios 9.0, tvos 9.0, watchos 5.0
Frameworks UIKit, CoreLocation

This utility is the Swift port of the APTimeZones library with the support for bundled frameworks. If your project is Objective-C, we recommend using theirs.

  • For Swift 4 version, use version ~> 0.4.0.
  • For Swift 3 version, use version ~> 0.3.0.
  • For Swift 2 version, use version ~> 0.1.0.


    //San Diego, CA, USA
    let location = CLLocation(latitude: 32.88, longitude: -117.15)

    //TimeZone from extension (fast, synchronous, approximate)
    var timeZone = location.timeZone

    //or calling the class method
    timeZone = TimeZoneLocate.timeZone(location: location)

    //if you have the country code, you can speed things up.
    timeZone = TimeZoneLocate.timeZone(location: location, countryCode: "US")

    // A MORE accurate time zone if you are connected to network. (iOS 9.0 or later)
    location.timeZone { (tz) -> (Void) in
      guard let tz = tz else { return }
      // got a more accureate timezone from the network
      print("Network TimeZone: (tz.identifier)")

    // Same thing
    TimeZoneLocate.geocodeTimeZone(location: location) { (tz) -> (Void) in
      guard let tz = tz else { return }
      print("Network TimeZone: (tz.identifier) (class method)")


To install it, simply add the following line to your Podfile:

pod "TimeZoneLocate"



TimeZoneLocate is available under the MIT license. See the LICENSE file for more info.

Latest podspec

    "name": "TimeZoneLocate",
    "version": "0.4.3",
    "summary": "Get a time zone for a location offline.",
    "description": "This is a Swift port of the APTimeZones library with the support for Frameworks.nGiven a CLLocation determine the timezone for that point without an internet connection (offline).",
    "homepage": "",
    "license": "MIT",
    "authors": {
        "Anthony Persaud": "[email protected]"
    "source": {
        "git": "",
        "tag": "0.4.3"
    "social_media_url": "",
    "platforms": {
        "ios": "9.0",
        "tvos": "9.0",
        "watchos": "5.0"
    "swift_version": "4.2",
    "source_files": "Pod/Classes/**/*",
    "resource_bundles": {
        "TimeZoneLocate": [
    "frameworks": [

Pin It on Pinterest

Share This