{"id":13508259,"url":"https://github.com/UA3MQJ/wheretz","last_synced_at":"2025-03-30T10:30:46.707Z","repository":{"id":62430798,"uuid":"226920597","full_name":"UA3MQJ/wheretz","owner":"UA3MQJ","description":"Time zone by geo coordinates lookup","archived":false,"fork":false,"pushed_at":"2024-10-21T12:46:00.000Z","size":110282,"stargazers_count":11,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-25T21:08:19.363Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/UA3MQJ.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-12-09T16:47:55.000Z","updated_at":"2024-10-21T12:46:05.000Z","dependencies_parsed_at":"2022-11-01T20:22:06.453Z","dependency_job_id":"0f0c20ea-5451-4273-91ce-24ee595e94ca","html_url":"https://github.com/UA3MQJ/wheretz","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UA3MQJ%2Fwheretz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UA3MQJ%2Fwheretz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UA3MQJ%2Fwheretz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UA3MQJ%2Fwheretz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/UA3MQJ","download_url":"https://codeload.github.com/UA3MQJ/wheretz/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246307582,"owners_count":20756473,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T02:00:50.474Z","updated_at":"2025-03-30T10:30:46.375Z","avatar_url":"https://github.com/UA3MQJ.png","language":"Elixir","funding_links":[],"categories":["Geolocation"],"sub_categories":[],"readme":"# WhereTZ: timezone lookup\n[![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n[![Build Status](https://travis-ci.org/UA3MQJ/wheretz.svg?branch=master)](https://travis-ci.org/UA3MQJ/wheretz?branch=master)\n[![Hex.pm Version](http://img.shields.io/hexpm/v/wheretz.svg?style=flat)](https://hex.pm/packages/wheretz)\n[![Coverage Status](https://coveralls.io/repos/github/UA3MQJ/wheretz/badge.svg?branch=master)](https://coveralls.io/github/UA3MQJ/wheretz?branch=master)\n[![Inline docs](http://inch-ci.org/github/UA3MQJ/wheretz.svg)](http://inch-ci.org/github/UA3MQJ/wheretz)\n\n**WhereTZ** is elixir version of Ruby gem for lookup of timezone by georgraphic coordinates.\n\nhttps://github.com/zverok/wheretz\n\nFeatures:\n\n* no calls to external services, works without Internet connection;\n* Timezone result is [%Timex.TimezoneInfo](https://hexdocs.pm/timex/Timex.TimezoneInfo.html#t:t/0)\n\n## Usage\n\nAdd to project from hex.pm\n\n```elixir\ndef deps do\n  [\n    {:wheretz, \"~\u003e 0.1.17\"},\n  ]\nend\n```\n\nor from github\n\n```elixir\ndef deps do\n  [\n    {:wheretz, git: \"git@github.com:UA3MQJ/wheretz.git\", tag: \"v0.1.17\"},\n  ]\nend\n```\n\nBefore the first start, you need to download the geo and initializse the database.\n\n```elixir\nmix where_tz.init \n```\n\nusage\n\n```elixir\niex(1)\u003e WhereTZ.get(50.004444, 36.231389)   \n#\u003cTimezoneInfo(Europe/Kiev - EET (+02:00:00))\u003e\niex(2)\u003e WhereTZ.lookup(50.004444, 36.231389)\n\"Europe/Kiev\"\n```\n\n## How it works\n\n1. Latest version of [timezone-boundary-builder](https://github.com/evansiroky/timezone-boundary-builder) dataset is converted into mnesia table (125Mb);\n2. For each time zone, store timezone name, geo polygon and calculate _bounding box_ (min and max latitude and longitude);\n3. On each lookup `WhereTZ` first checks provided coordinates by bounding\n  boxes, and if only one bbox, corresponds to them, returns timezone name immediately;\n4. If there's several intersecting bounding boxes, `WhereTZ` checks which\n  polygon actually contains the point.\n\n## Known problems\n\n* ?\n\n## Author\n\nAlexey Bolshakov\n\n## Thanks to\n\n[Victor Shepelev](http://zverok.github.io/)\n\n## License\n\nData license is [ODbL](https://opendatacommons.org/licenses/odbl/).\n\nCode license is usual MIT.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FUA3MQJ%2Fwheretz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FUA3MQJ%2Fwheretz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FUA3MQJ%2Fwheretz/lists"}