GitXplorerGitXplorer
m

GeoTimeZone

public
236 stars
42 forks
5 issues

Commits

List of commits on branch main.
Verified
72820f8bd2495cdeaaa5a3126d30a851f2abe1dc

Merge pull request #53 from mattjohnsonpint/update

mmattjohnsonpint committed 2 years ago
Verified
b0d1469ceaa02d7780e9745cdd66054419cafcfa

Add test

mmattjohnsonpint committed 2 years ago
Verified
7347df451c2e64fad099b3e29787c741020df277

Update data to 2022g

mmattjohnsonpint committed 2 years ago
Verified
1544f37fe16bd9cef6659b634c308503d7ac8986

Bump test dependencies

mmattjohnsonpint committed 2 years ago
Verified
3a2b6e444339ab06d84faadc07e01f956e20847d

Delete global.json

mmattjohnsonpint committed 2 years ago
Verified
d3f0fbd4f868febdf645e0fd635db73a7aa0c3cd

Pack on CI

mmattjohnsonpint committed 2 years ago

README

The README file for this repository.

GeoTimeZone NuGet Version

Provides an IANA time zone identifier from latitude and longitude coordinates.

Nuget Installation

PM> Install-Package GeoTimeZone

Supported Environments

As of version 5.0.0, GeoTimeZone works with all of the following:

  • .NET 5 or greater
  • .NET Core 2.0 or greater
  • .NET Framework 4.6.2 and greater

Note that .NET Framework versions less than 4.6.2 are no longer supported.

Example Usage

string tz = TimeZoneLookup.GetTimeZone(50.4372, -3.5559).Result;  // "Europe/London"

Usage Notes

This library returns IANA time zone IDs. If you need a Windows time zone ID, pass the return value into the TimeZoneConverter library's TZConvert.IanaToWindows method, or to TZConvert.GetTimeZoneInfo to get a TimeZoneInfo object in a platform-neutral manner.

This library uses the time zone border definitions from the Timezone Boundary Builder project, which in-turn derive from Open Street Map. As some international borders are the subject of dispute, the results may or may not align with your worldview. Use at your own risk.

Acknowledgements

Huge thank you to the following people:

  • Evan Siroky, who tirelessly maintains the Time Zone Boundary Builder project, which we use for our source data.
  • Eric Muller, who authored the original tz_world data set (now deprecated in favor of TBB).
  • Simon Bartlett, who contributed all the polygon indexing and lookup bits to this library.
  • Sharon Lourduraj, who wrote GeoHash-net that we used for our original implementation.
  • David Troy, who wrote Geohash-js that Sharon later ported to .NET
  • Nick Johnson, who's excellent blog post has been an inspiration to this project and so many others!
  • Jonas Nyrup, who has helped with performance optimizations.

License

This library is provided free of charge, under the terms of the MIT license.