{"id":22339686,"url":"https://github.com/ringsaturn/tzf-server","last_synced_at":"2025-07-30T00:31:17.330Z","repository":{"id":56720187,"uuid":"497911524","full_name":"ringsaturn/tzf-server","owner":"ringsaturn","description":"Simple server convert longitude\u0026latitude to timezone name","archived":true,"fork":false,"pushed_at":"2025-04-16T22:59:17.000Z","size":1037,"stargazers_count":5,"open_issues_count":5,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-29T01:47:46.329Z","etag":null,"topics":["latitude","longitude","timezone-library","timezone-picker","tzf"],"latest_commit_sha":null,"homepage":"https://tzf-server.ringsaturn.me/web/click","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ringsaturn.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":"2022-05-30T11:22:48.000Z","updated_at":"2025-04-20T05:40:41.000Z","dependencies_parsed_at":"2023-01-30T22:15:41.375Z","dependency_job_id":"26392443-ce66-459a-9f54-cc98865320de","html_url":"https://github.com/ringsaturn/tzf-server","commit_stats":null,"previous_names":[],"tags_count":50,"template":false,"template_full_name":null,"purl":"pkg:github/ringsaturn/tzf-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ringsaturn%2Ftzf-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ringsaturn%2Ftzf-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ringsaturn%2Ftzf-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ringsaturn%2Ftzf-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ringsaturn","download_url":"https://codeload.github.com/ringsaturn/tzf-server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ringsaturn%2Ftzf-server/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267785731,"owners_count":24144119,"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","status":"online","status_checked_at":"2025-07-29T02:00:12.549Z","response_time":2574,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["latitude","longitude","timezone-library","timezone-picker","tzf"],"created_at":"2024-12-04T07:09:07.344Z","updated_at":"2025-07-30T00:31:16.889Z","avatar_url":"https://github.com/ringsaturn.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1\u003eSimple server convert longitude\u0026latitude to timezone name\u003c/h1\u003e\n\n\u003cimg width=\"1920\" src=\"https://github.com/ringsaturn/tzf-server/assets/13536789/9a820db1-1de9-49e6-9047-4e72c2fe41a8\"\u003e\n\n\u003e [!NOTE]\n\u003e\n\u003e It's designed as a debugger tool for package\n\u003e [tzf](https://github.com/ringsaturn/tzf), not production ready.\n\n- [Quick Start](#quick-start)\n  - [Install](#install)\n    - [Install via `go install`](#install-via-go-install)\n    - [Download from release page](#download-from-release-page)\n    - [Install from Docker Hub](#install-from-docker-hub)\n  - [Usage](#usage)\n- [Web Pages](#web-pages)\n  - [All supported timezone names](#all-supported-timezone-names)\n  - [\\[Experiment\\] Clickable debugger](#experiment-clickable-debugger)\n- [HTTP API](#http-api)\n  - [Lookup Location's timezone](#lookup-locations-timezone)\n  - [Lookup Location's timezones](#lookup-locations-timezones)\n  - [All supported timezone names](#all-supported-timezone-names-1)\n- [Redis Protocol Commands](#redis-protocol-commands)\n  - [`redis-cli`](#redis-cli)\n  - [`redis-py`](#redis-py)\n\n## Quick Start\n\n### Install\n\n#### Install via `go install`\n\n```bash\ngo install github.com/ringsaturn/tzf-server@latest\n```\n\n#### Download from release page\n\nPlease visit \u003chttps://github.com/ringsaturn/tzf-server/releases\u003e to get latest\nrelease.\n\n#### Install from [Docker Hub](https://hub.docker.com/r/ringsaturn/tzf-server)\n\n```bash\ndocker pull ringsaturn/tzf-server\n```\n\n### Usage\n\n```console\nUsage of tzf-server:\n  -disable-print-route\n        Disable Print Route\n  -hertz-prometheus-host-port string\n        Hertz Prometheus Host\u0026Port (default \"0.0.0.0:8090\")\n  -hertz-prometheus-path string\n        Hertz Prometheus Path (default \"/hertz\")\n  -http-addr string\n        HTTP Host\u0026Port (default \"0.0.0.0:8080\")\n  -path string\n        custom data\n  -prometheus-enable-go-coll\n        Enable Go Collector (default true)\n  -prometheus-host-port string\n        Prometheus Host\u0026Port (default \"0.0.0.0:2112\")\n  -prometheus-path string\n        Prometheus Path (default \"/metrics\")\n  -redis-addr string\n        Redis Server Host\u0026Port (default \"localhost:6380\")\n  -type int\n        which finder to use Polygon(0) or Fuzzy(1)\n```\n\nFor example, start\n[DefaultFinder](https://pkg.go.dev/github.com/ringsaturn/tzf#DefaultFinder)\nserver:\n\n```bash\ntzf-server\n```\n\nOr start [FuzzyFinder](https://pkg.go.dev/github.com/ringsaturn/tzf#FuzzyFinder)\nbased server:\n\n```bash\ntzf-server -type 1\n```\n\n## Web Pages\n\n\u003e [!NOTE]\n\u003e\n\u003e Please note that the live demo below is runned on a free plan of Render, so it\n\u003e may take a while to start the server. Please do not use it for production.\n\n### All supported timezone names\n\n- [`http://localhost:8080/web/tzs/all`](http://localhost:8080/web/tzs/all)\n- Live demo: \u003chttps://tzf-server.ringsaturn.me/web/tzs/all\u003e\n\n### [Experiment] Clickable debugger\n\n- [`http://localhost:8080/web/click`](http://localhost:8080/web/click)\n- Live demo: \u003chttps://tzf-server.ringsaturn.me/web/click\u003e\n\nI have little knowledge about frontend development so it's just a experiment,\nmost codes are written by ChatGPT 3.5. You can access the prompts from\n[gist](https://gist.github.com/ringsaturn/12b5509d80f69e7bca13da8745f7ce15).\n\n## HTTP API\n\n\u003e [!NOTE]\n\u003e\n\u003e Please note that the live demo below is runned on a free plan of Render, so it\n\u003e may take a while to start the server. Please do not use it for production.\n\nA swagger UI can be found at\n[`http://localhost:8080/swagger/index.html`](http://localhost:8080/swagger/index.html).\n\nOr live demo: \u003chttps://tzf-server.ringsaturn.me/swagger/index.html\u003e\n\n### Lookup Location's timezone\n\n```bash\ncurl \"http://localhost:8080/api/v1/tz?longitude=116.3883\u0026latitude=39.9289\"\n```\n\nor live demo:\n\n```bash\ncurl \"https://tzf-server.ringsaturn.me/api/v1/tz?longitude=116.3883\u0026latitude=39.9289\"\n```\n\nOutput:\n\n```json\n{\n  \"timezone\": \"Asia/Shanghai\",\n  \"abbreviation\": \"CST\",\n  \"offset\": \"28800s\"\n}\n```\n\n### Lookup Location's timezones\n\n```bash\ncurl \"http://localhost:8080/api/v1/tzs?longitude=87.6168\u0026latitude=43.8254\"\n```\n\nor live demo:\n\n```bash\ncurl \"https://tzf-server.ringsaturn.me/api/v1/tzs?longitude=87.6168\u0026latitude=43.8254\"\n```\n\nOutput:\n\n```json\n{\n  \"timezones\": [\n    {\n      \"timezone\": \"Asia/Shanghai\",\n      \"abbreviation\": \"CST\",\n      \"offset\": \"28800s\"\n    },\n    {\n      \"timezone\": \"Asia/Urumqi\",\n      \"abbreviation\": \"+06\",\n      \"offset\": \"21600s\"\n    }\n  ]\n}\n```\n\n### All supported timezone names\n\n```bash\ncurl \"http://localhost:8080/api/v1/tzs/all\"\n```\n\nor live demo:\n\n```bash\ncurl \"https://tzf-server.ringsaturn.me/api/v1/tzs/all\"\n```\n\nOutput:\n\n```jsonc\n{\n  \"timezones\": [\n    {\n      \"timezone\": \"Africa/Abidjan\",\n      \"abbreviation\": \"GMT\",\n      \"offset\": \"0s\"\n    },\n    // ...\n    {\n      \"timezone\": \"Etc/GMT+12\",\n      \"abbreviation\": \"-12\",\n      \"offset\": \"-43200s\"\n    }\n  ]\n}\n```\n\n## Redis Protocol Commands\n\n### `redis-cli`\n\n```console\n$ redis-cli -p 6380\n127.0.0.1:6380\u003e GET_TZ 116.3883 39.9289\nAsia/Shanghai\n127.0.0.1:6380\u003e GET_TZS 87.4160 44.0400\n1) \"Asia/Shanghai\"\n2) \"Asia/Urumqi\"\n```\n\n### `redis-py`\n\n```python\n\u003e\u003e\u003e from redis import Redis\n\u003e\u003e\u003e rc = Redis.from_url(\"redis://localhost:6380\")\n\u003e\u003e\u003e rc.ping()\nTrue\n\u003e\u003e\u003e rc.execute_command(\"get_tz\", 116.3883, 39.9289).decode()\n'Asia/Shanghai'\n\u003e\u003e\u003e rc.execute_command(\"get_tzs\", 87.4160, 44.0400)\n[b'Asia/Shanghai', b'Asia/Urumqi']\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fringsaturn%2Ftzf-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fringsaturn%2Ftzf-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fringsaturn%2Ftzf-server/lists"}