{"id":13585733,"url":"https://github.com/yankeexe/timezones-cli","last_synced_at":"2025-04-05T08:09:53.830Z","repository":{"id":48967531,"uuid":"301293473","full_name":"yankeexe/timezones-cli","owner":"yankeexe","description":"CLI toolkit for timezones :earth_asia:","archived":false,"fork":false,"pushed_at":"2025-02-23T11:56:26.000Z","size":131,"stargazers_count":73,"open_issues_count":0,"forks_count":9,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-29T07:09:01.809Z","etag":null,"topics":["cli","cli-app","datetime","python","python-cli","python-click","timezone","utc","utc-datetime"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/timezones-cli/","language":"Python","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/yankeexe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"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":"2020-10-05T04:32:25.000Z","updated_at":"2025-02-23T11:56:04.000Z","dependencies_parsed_at":"2025-01-15T21:09:59.597Z","dependency_job_id":"9a12d747-7a52-461c-93e7-878d5a2abf8b","html_url":"https://github.com/yankeexe/timezones-cli","commit_stats":{"total_commits":80,"total_committers":2,"mean_commits":40.0,"dds":"0.025000000000000022","last_synced_commit":"0ab5d235bd326260094b67a633c11d231fded253"},"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yankeexe%2Ftimezones-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yankeexe%2Ftimezones-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yankeexe%2Ftimezones-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yankeexe%2Ftimezones-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yankeexe","download_url":"https://codeload.github.com/yankeexe/timezones-cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247305935,"owners_count":20917208,"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","cli-app","datetime","python","python-cli","python-click","timezone","utc","utc-datetime"],"created_at":"2024-08-01T15:05:06.923Z","updated_at":"2025-04-05T08:09:53.811Z","avatar_url":"https://github.com/yankeexe.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"\u003cimg src=\"https://i.imgur.com/ZebplfT.png\" width=\"110\" align=\"left\"/\u003e\u003ch1\u003eTimezones CLI\u003c/h1\u003e\n\n\u003cp\u003e\u003cstrong\u003eCLI toolkit for timezones:zap:\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003e\n\u003cimg src=\"https://img.shields.io/pypi/v/timezones-cli?style=flat-square\u0026color=black\"/\u003e\n\u003cimg src=\"https://img.shields.io/pypi/pyversions/timezones-cli?style=flat-square\u0026color=black\"/\u003e\n\u003cimg src=\"https://img.shields.io/pypi/l/timezones-cli?style=flat-square\u0026color=black\"/\u003e\n\u003cimg src=\"https://static.pepy.tech/badge/timezones-cli\"/\u003e\n\u003c/p\u003e\n\n\n\u003cimg src=\"https://i.imgur.com/JIt8tQN.png\"  width=\"500\" /\u003e\n\n## What can you do with `timezones-cli`? :sparkles:\n- Search for date and time based on city, country, or timezones.\n- Manage dashboard for timezones you frequently view.\n- Get UTC date and time based on your local timezone or any timezones.\n\n## Contents\n\n- [Installation](#installation)\n- [Usage](#usage)\n  - [Search for timezones](#search-for-timezones)\n  - [Add/save timezones](#addsave-timezones)\n  - [Remove timezones](#remove-timezones)\n  - [Show saved timezones](#show-saved-timezones)\n  - [Select individual timezones from saved](#select-individual-timezones-from-saved)\n  - [Get UTC time](#get-utc-time)\n- [Run using Docker :whale:](#run-using-docker-whale)\n- [Contributing](#contributing)\n\n\n## Installation\n\n```bash\n  $ pip3 install timezones-cli\n```\nTo run this CLI using Docker, check [Run using Docker :whale:](#run-using-docker-whale).\n\n\u003e **NOTE:** [List of country codes or timezone names](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List) :earth_asia:\n\n\u003e **Use `-t` flag to toggle 24 hours format.**\n\n## Usage\n\n### Search for timezones\n\nGet time based on the entered timezone or country code\n\n- using country code (either 2 or 3 letters):\n\n  ```bash\n    $ tz search US\n\n    $ tz search USA\n  ```\n\n- using timezone:\n  ```bash\n    $ tz search Asia/Kathmandu\n  ```\n\n- using fuzzy text: (example: Ireland)\n  ```bash\n    $ tz search Irela\n  ```\n\n- using timezone shortcodes (--zone or -z flag):\n  ```bash\n    $ tz search pst -z\n\n    $ tz search ist -z\n\n    $ tz search jst -z\n\n    $ tz search cest -z\n\n    $ tz search +0543 -z\n\n    $ tz search +05 -z\n  ```\n\n\u003cdetails\u003e\u003csummary\u003e\u003cstrong\u003eDemo\u003c/strong\u003e\u003c/summary\u003e\n\n\u003cimg src = \"https://i.imgur.com/D2bcHG2.gif\" width=\"700\" alt=\"demo of timezone cli search\" /\u003e\n\u003c/details\u003e\n\n---\n\n### Add/save timezones\n\nTimezones added to the config file are treated as the default timezones which is triggered by the `tz show` command.\n\n\u003e file is stored at ~/.tz-cli\n\n```bash\n$ tz add \"Asia/Kathmandu\"\n```\n\n\u003cdetails\u003e\u003csummary\u003e\u003cstrong\u003eDemo\u003c/strong\u003e\u003c/summary\u003e\n\n\u003cimg src = \"https://i.imgur.com/32XUBIP.gif\" width=\"700\" alt=\"demo of timezone cli add\" /\u003e\n\u003c/details\u003e\n---\n\n### Remove timezones\n\nThere are two ways for removing timezones from the config file. Using the `--interactive` mode and passing the the `--name` flag.\n\n```bash\n$ tz remove -i\n\n$ tz remove --name \"Asia/Kathmandu\"\n```\n\n\u003cdetails\u003e\u003csummary\u003e\u003cstrong\u003eDemo\u003c/strong\u003e\u003c/summary\u003e\n\n\u003cimg src = \"https://i.imgur.com/q0lRtJt.gif\" width=\"700\" alt=\"demo of timezone cli remove\" /\u003e\n\u003c/details\u003e\n\n---\n\n### Show saved timezones\n\n```bash\n$ tz show\n```\n\n\u003cdetails\u003e\u003csummary\u003e\u003cstrong\u003eDemo\u003c/strong\u003e\u003c/summary\u003e\n\n\u003cimg src = \"https://i.imgur.com/s2Qq1Yb.gif\" width=\"700\" alt=\"demo of timezone cli show\" /\u003e\n\u003c/details\u003e\n---\n\n### Select individual timezones from saved\n\n```bash\n$ tz select\n```\n\n\u003cdetails\u003e\u003csummary\u003e\u003cstrong\u003eDemo\u003c/strong\u003e\u003c/summary\u003e\n\n\u003cimg src = \"https://i.imgur.com/VF91IZE.gif\" width=\"700\" alt=\"demo of timezone cli select\" /\u003e\n\u003c/details\u003e\n\n---\n\n### Get UTC time\n\nGet UTC time based on current system time.\n\n\u003e **tz utc --help**\n\n```bash\n$ tz utc\n```\n\nGet UTC time based on specified time and timezone.\n\n```bash\n$ tz utc \u003ctime\u003e \u003ctimezone\u003e\n\n$ tz utc \"11:45PM\" \"Asia/Kathmandu\"\n```\n\n\u003cdetails\u003e\u003csummary\u003e\u003cstrong\u003eDemo\u003c/strong\u003e\u003c/summary\u003e\n\n\u003cimg src = \"https://i.imgur.com/8hjy1XP.gif\" width=\"500\" alt=\"demo of timezone cli select\" /\u003e\n\u003c/details\u003e\n\n## Run using Docker :whale:\n\n```bash\ndocker pull ghcr.io/yankeexe/timezones-cli:latest\n```\n\nVerify signature of the image: requires [cosign](https://docs.sigstore.dev/cosign/installation/).\n\n```bash\nCOSIGN_EXPERIMENTAL=true cosign verify ghcr.io/yankeexe/timezones-cli:latest\n```\n\nCreate a config file manually first.\n\n```bash\n$ touch ~/.tz-cli\n\n$ docker run --rm -it -v ${HOME}/.tz-cli:/home/tz/.tz-cli ghcr.io/yankeexe/timezones-cli search us\n```\nFor convenience you can add alias of the command to your shell config:\n```bash\n$ echo \"alias tz='docker run --rm -it -v ${HOME}/.tz-cli:/home/tz/.tz-cli ghcr.io/yankeexe/timezones-cli'\" \u003e\u003e ~/.bashrc\n$ source ~/.bashrc\n\n$ echo \"alias tz='docker run --rm -it -v ${HOME}/.tz-cli:/home/tz/.tz-cli ghcr.io/yankeexe/timezones-cli'\" \u003e\u003e ~/.zshrc\n$ source ~/.zshrc\n\n# Use alias to invoke timezones-cli\n$ tz search Nepal\n```\n\n---\n\nFor local debugging: Use the `make run` command followed by the command you want to run against the `tz` binary.\n\n```bash\n$ make run cmd=\"get ist\"\n```\n\n\u003cdetails\u003e\u003csummary\u003e\u003cstrong\u003eDemo\u003c/strong\u003e\u003c/summary\u003e\n\n\u003cimg src = \"https://i.imgur.com/t8RgJqg.png\" width=\"500\" alt=\"demo of timezone cli with Docker\" /\u003e\n\u003c/details\u003e\n\n## Contributing\n\nFor guidance on setting up a development environment and how to make a contribution to `timezones-cli`, see the [contributing guidelines](https://github.com/yankeexe/timezones-cli/blob/master/CONTRIBUTING.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyankeexe%2Ftimezones-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyankeexe%2Ftimezones-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyankeexe%2Ftimezones-cli/lists"}