Skip to content

Lat/long to timezone mapper in Java. Does not require web services or data files - just pure Java or Swift.

License

Notifications You must be signed in to change notification settings

rlemaire/LatLongToTimezone

 
 

Repository files navigation

LatLongToTimezone

Lat/long to timezone mapper in Java and Swift. Does not require web services or data files.

99% of people using this project just need the one file:

(Java) https://github.com/drtimcooper/LatLongToTimezone/blob/master/Tester/src/TimezoneMapper.java

(Swift) https://github.com/drtimcooper/LatLongToTimezone/blob/master/Classes/TimezoneMapper.swift

(CSharp) https://github.com/drtimcooper/LatLongToTimezone/blob/master/Output/Toolbox.TimeAndDate.TimezoneMapper.cs

Usage

On iOS, the code is available as a CocoaPod. Just add this to your Podspec:

pod 'LatLongToTimezone'

Then in your code, you can do

import LatLongToTimezone

let location = CLLocationCoordinate2D(latitude: 34, longitude: -122)
let timeZone: NSTimeZone = TimezoneMapper.latLngToTimezone(location)

About

Lat/long to timezone mapper in Java. Does not require web services or data files - just pure Java or Swift.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 66.0%
  • Swift 15.0%
  • C# 13.2%
  • C 4.7%
  • HTML 0.8%
  • Pascal 0.1%
  • Other 0.2%