{"id":17685746,"url":"https://github.com/neved4/gotwc","last_synced_at":"2025-05-13T00:05:58.890Z","repository":{"id":211965200,"uuid":"730377691","full_name":"Neved4/gotwc","owner":"Neved4","description":"⌚️ Tiny world clock in Go!","archived":false,"fork":false,"pushed_at":"2025-01-13T14:59:51.000Z","size":29,"stargazers_count":3,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-05-13T00:05:49.755Z","etag":null,"topics":["cli","clock","command","date","datetime","go","golang","iso8601","line","terminal","time-zones","tool","tz","tzinfo"],"latest_commit_sha":null,"homepage":"","language":"Go","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/Neved4.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":"2023-12-11T19:45:40.000Z","updated_at":"2025-01-13T14:59:56.000Z","dependencies_parsed_at":"2024-10-24T13:05:59.655Z","dependency_job_id":"6fbffbc2-c14c-43d9-9cc6-c718ee0bdc47","html_url":"https://github.com/Neved4/gotwc","commit_stats":null,"previous_names":["neved4/twc-go","neved4/gotwc"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Neved4%2Fgotwc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Neved4%2Fgotwc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Neved4%2Fgotwc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Neved4%2Fgotwc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Neved4","download_url":"https://codeload.github.com/Neved4/gotwc/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253843215,"owners_count":21972873,"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":["cli","clock","command","date","datetime","go","golang","iso8601","line","terminal","time-zones","tool","tz","tzinfo"],"created_at":"2024-10-24T10:28:55.436Z","updated_at":"2025-05-13T00:05:58.854Z","avatar_url":"https://github.com/Neved4.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Go](https://img.shields.io/badge/Go-00ADD8?logo=go\u0026logoColor=fff)\n[![CodeQL](https://github.com/github/docs/actions/workflows/codeql.yml/badge.svg)](https://github.com/Neved4/gotwc/actions/workflows/codeql.yml)\n[![Homebrew](https://img.shields.io/badge/Homebrew-tap-2AAB47?logo=homebrew\u0026logoColor=959DA5\u0026labelColor=2B3137)](https://github.com/Neved4/homebrew-tap/blob/main/Formula/gotwc.rb)\n\n# `gotwc` - Tiny world clock in Go! 🚀\n\nFast, CLI world clock that displays time zone information using\n[tz database] to read valid [tz entries].\n\n```console\n$ gotwc -h -f tools/samples/tz-small.conf\nAmerica/New_York     2023-12-11 12:37:13\nAmerica/Los_Angeles  2023-12-11 09:37:13\nUTC                  2023-12-11 17:37:13\nEurope/London        2023-12-11 17:37:13\nEurope/Paris         2023-12-11 18:37:13\nAsia/Tokyo           2023-12-12 02:37:13\nAustralia/Sydney     2023-12-12 04:37:13\n```\n\n### Highlights\n\n- 🚀 _**Fast**_ - **10X** times faster than [`twc.c`] and **65X** times\n  faster than `date`.[^bench] \\\n  Only ≈ `7 ms` for one entry, and ≈ `177 ms` for ≈ 600\n  entries.\n- 🔒 _**Robust**_ - tested to work with all [tz database] entries,\n  [`version 2023c`].\n- 📦 **Self-contained** - zero dependencies,\n  lightweight (`110 lines`, `2458 bytes`).\n\n## Getting Started\n\n### Prerequisites\n\nIf you are building [`gotwc`], you'll need:\n\n- A [Go] compiler\n\n### Installing\n\nIf you have [Homebrew] installed, just run:\n```shell\nbrew install Neved4/homebrew-tap/gotwc\n```\n\nAlternatively, clone the repository:\n```shell\ngit clone https://github.com/Neved4/gotwc\n```\n\nThen build:\n```shell\ngo build\n```\n\n### Usage\n\nThe following usage and options are available:\n\n```text\ngotwc [-h] [-f path] [-s format] [-t timezone] ...\n\nOptions:\n  -f path\n      Read config from path (default \"$HOME/.config/twc/tz.conf\")\n  -h\n      Print in human-readable format\n  -s format\n      Set desired time format (e.g. \"%Y-%m-%d\")\n  -t timezone\n      specific timezone (e.g. \"Asia/Tokyo\")\n\nExamples:\n  Print Tokyo's date in a human-readable format with YY-MM-DD format:\n\n    $ gotwc -h -s %Y-%m-%d -t Asia/Tokyo\n    Asia/Tokyo  2024-01-02 15:04:05\n  \n  Print date in Los Angeles using an environment variable for the timezone:\n  \n    $ TZ=America/Los_Angeles gotwc\n    2024-01-02T15:04:05-0800\n\nEnvironment:\n  XDG_CONFIG_HOME\n    When defined, it will be used to store the tz.conf file.\n  TZ\n    Timezone to use when displaying dates.\n\nFiles:\n  ~/.config/twc/tz.conf\n    Stores tz database entries to be displayed.\n\nSee also:\n  environ(7)\n```\n\n### Docker\n\nTo compile the binary inside a [Docker] image, run:\n```shell\ndocker build .\n```\n\n## Compatibility\n\nRuns on _**Linux**_, _**macOS**_ and _**\\*BSD**_ systems on both\n[`x86_64`] and [`arm64`].\n\n## Standards\n\n`gotwc` should run on most [POSIX.1-2017][][^posix] compatible systems and\nproduce [ISO 8601][][^iso8601] output.\n\n## License\n                 \n[`gotwc`] is licensed under the terms of the [MIT License].\n\nSee the [LICENSE](LICENSE) file for details.\n\n## Related Projects\n\n- [oz/tz] - awesome cli time zone helper\n- [tzdiff] - cli timezone diff\n- [Neved4/twc][`twc.c`] - tiny world clock in C\n  \n[Go]: https://go.dev/\n[`gotwc`]: https://github.com/Neved4/gotwc\n[`hyperfine`]: https://github.com/sharkdp/hyperfine\n[`arm64`]: https://en.wikipedia.org/wiki/AArch64\n[`x86_64`]: https://en.wikipedia.org/wiki/X86-64\n[MIT License]: https://opensource.org/license/mit/\n[POSIX.1-2017]: https://pubs.opengroup.org/onlinepubs/9699919799/\n[ISO 8601]: https://www.iso.org/obp/ui/#iso:std:iso:8601:-2:ed-1:v1:en\n[tz database]: https://en.wikipedia.org/wiki/Tz_database\n[tz entries]: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones\n[`version 2023c`]: https://www.iana.org/time-zones\n[Homebrew]: https://brew.sh/\n[Docker]: https://www.docker.com/\n[oz/tz]: https://github.com/oz/tz\n[tzdiff]: https://github.com/belgianbeer/tzdiff\n[`twc.c`]: https://github.com/Neved4/twc\n\n[^bench]: _cfr._ `date` command takes ≈ `931 ms` when iterating over ≈ 600\n    entries. Measured with [`hyperfine`].\n[^posix]: _IEEE Std 1003.1-2017: Standard for Information Technology\n    — Portable Operating System Interface (POSIX®)_, \\\n    ISO/IEC/IEEE 9945:2009/COR 2:2017. URL: https://pubs.opengroup.org/onlinepubs/9699919799/\n[^iso8601]: _ISO 8601: Date and time \\ — Representations for information interchange_, ISO 8601-1:2019. \\\n    URL: https://www.iso.org/obp/ui/#iso:std:iso:8601:-2:ed-1:v1:en\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneved4%2Fgotwc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneved4%2Fgotwc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneved4%2Fgotwc/lists"}