{"id":13775505,"url":"https://github.com/merschformann/gotz","last_synced_at":"2025-10-21T03:58:34.347Z","repository":{"id":39889115,"uuid":"453028000","full_name":"merschformann/gotz","owner":"merschformann","description":"CLI timezone info","archived":false,"fork":false,"pushed_at":"2025-10-01T00:11:53.000Z","size":1079,"stargazers_count":142,"open_issues_count":3,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-10-04T03:43:12.862Z","etag":null,"topics":["cli","timezone","timezone-conversion","tui","tz"],"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/merschformann.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-01-28T10:35:52.000Z","updated_at":"2025-10-01T00:11:56.000Z","dependencies_parsed_at":"2024-06-19T00:21:57.366Z","dependency_job_id":"e69e148c-ccf3-4e0f-a02e-e75b565ff1c8","html_url":"https://github.com/merschformann/gotz","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/merschformann/gotz","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/merschformann%2Fgotz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/merschformann%2Fgotz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/merschformann%2Fgotz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/merschformann%2Fgotz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/merschformann","download_url":"https://codeload.github.com/merschformann/gotz/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/merschformann%2Fgotz/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280200870,"owners_count":26289477,"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-10-21T02:00:06.614Z","response_time":58,"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":["cli","timezone","timezone-conversion","tui","tz"],"created_at":"2024-08-03T17:01:39.946Z","updated_at":"2025-10-21T03:58:34.342Z","avatar_url":"https://github.com/merschformann.png","language":"Go","funding_links":[],"categories":["Productivity"],"sub_categories":["Kubernetes"],"readme":"# gotz \u003cimg src='material/icon/world.svg' align=\"right\" height=\"110\" /\u003e\n\ngo**tz** - a simple CLI timezone info tool.\n\n## Installation\n\n### Directly via [Go](https://go.dev/doc/install)\n\n```bash\ngo install github.com/merschformann/gotz@latest\n```\n\n### Binary\n\nSimply download the binary of the [latest release](https://github.com/merschformann/gotz/releases/latest/) (look for `gotz_*_OS_ARCH` - darwin is macOS), unpack the `gotz` binary and put it in a folder in your `$PATH`.\n\n### Homebrew\n\n```bash\nbrew tap merschformann/gotz # only once\nbrew install gotz\n```\n\n## Usage\n\nShow current time:\n\n```bash\ngotz\n```\n\n![preview](material/screenshot/gotz.png)\n\nShow arbitrary time:\n\n```bash\ngotz 15\n```\n\n![preview](material/screenshot/gotz-15-1.png)\n\nShow arbitrary time using different timezone (index based):\n\n```bash\ngotz 15@2\n```\n\n![preview](material/screenshot/gotz-15-2.png)\n\nShow arbitrary time using different timezone (explicit TZ code):\n\n```bash\ngotz 15@Asia/Tokyo\n```\n\n![preview](material/screenshot/gotz-15-3.png)\n\nTime can be one of the following formats:\n\n```txt\n15\n15:04\n15:04:05\n3:04pm\n3:04:05pm\n3pm\n1504\n150405\n2006-01-02T15:04:05\n```\n\nUse live mode to continuously update the time (exit via _q_, _esc_ or _ctrl+c_). Activate once via:\n\n```bash\ngotz --live true\n```\n\n![preview](material/screenshot/gotz-live.png)\n\n(above also uses option `--inline false`; for styling see customization below)\n\n## Basic configuration\n\nSet the timezones to be used by default:\n\n```bash\ngotz --timezones \"Office:America/New_York,Home:Europe/Berlin\"\n```\n\n(lookup timezones in the [timezones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) wiki page - _TZ identifier_ column)\n\nSet 12-hour format:\n\n```bash\ngotz --hours12 true\n```\n\n## Customization\n\nThe configuration is stored in `$XDG_CONFIG_HOME/gotz/config.json` (usually `~/.config/gotz/config.json` on most systems). It can be configured directly or via the arguments of the `gotz` command (see `gotz --help`). The configuration attributes are described in the following example:\n\n```jsonc\n{\n    // Tracks the version of the configuration file (automatically written on creation)\n    \"config_version\": \"1.0\",\n    // Configures the timezones to be shown\n    \"timezones\": [\n        // Timezones have a name (Name) and timezone code (TZ)\n        { \"Name\": \"Office\", \"TZ\": \"America/New_York\" },\n        { \"Name\": \"Home\", \"TZ\": \"Europe/Berlin\" },\n    ],\n    // Configures the style of the plot\n    \"style\": {\n        // Select symbols to use for the time blocks\n        // (one of 'mono', 'rectangles', 'blocks', 'sun-moon' or 'custom')\n        \"symbols\": \"mono\",\n        // Define custom symbols (used if 'symbols' is 'custom')\n        // Each symbol is used from its start time (hour in day as int) until the next symbol\n        \"custom_symbols\": [\n            { \"Start\": 6, \"Symbol\": \"▓\" },\n            { \"Start\": 8, \"Symbol\": \"█\" },\n            { \"Start\": 18, \"Symbol\": \"▓\" },\n            { \"Start\": 22, \"Symbol\": \"░\" }\n        ],\n        // Indicates whether to use coloring at all\n        \"colorize\": true,\n        // Configures how the day is segmented\n        \"day_segments\": {\n            // Hour of the morning to start (0-23)\n            \"morning\": 6,\n            // Hour of the day (business hours / main time) to start (0-23)\n            \"day\": 8,\n            // Hour of the evening to start (0-23)\n            \"evening\": 18,\n            // Hour of the night to start (0-23)\n            \"night\": 22\n        },\n        // Defines the colors for the segments\n        // Static mode colors can be one of:\n        //  - \u003esimple\u003c color names like `red`, `green`, `cyan`, etc.\n        //  - terminal color codes like `\\u001b[34m`, `\\u001b[32m`, etc.\n        //  - hex codes like #DC143C, #00ff00, etc. (if true color is supported)\n        // Dynamic mode colors \n        //  - tcell color names like crimson, green, etc.\n        //  - hex codes like #DC143C, #00ff00, etc.\n        // Note that some symbols are not fully opaque and will show the background color, thus,\n        //   making the color appear darker (or lighter for white/light terminal backgrounds)\n        \"coloring\": {\n            // Color of the morning segment for static mode\n            \"StaticColorMorning\": \"#EC3620\",\n            // Color of the morning segment for static mode\n            \"StaticColorDay\": \"#F9C748\",\n            // Color of the morning segment for static mode\n            \"StaticColorEvening\": \"#EC3620\",\n            // Color of the morning segment for static mode\n            \"StaticColorNight\": \"#030D4D\",\n            // Foreground color overriding default for static mode (optional)\n            \"StaticColorForeground\": \"\",\n            // Color of the morning segment for dynamic mode\n            \"DynamicColorMorning\": \"#419AA8\",\n            // Color of the day segment for dynamic mode\n            \"DynamicColorDay\": \"#FFFFFF\",\n            // Color of the evening segment for dynamic mode\n            \"DynamicColorEvening\": \"#419AA8\",\n            // Color of the night segment for dynamic mode\n            \"DynamicColorNight\": \"#09293F\",\n            // Foreground color overriding default for dynamic mode (optional)\n            \"DynamicColorForeground\": \"\",\n            // Background color overriding default for dynamic mode (optional)\n            \"DynamicColorBackground\": \"\"\n        }\n    },\n    // Indicates whether to plot tics for the local time\n    \"tics\": false,\n    // Indicates whether to stretch across the full terminal width (causes inhomogeneous segment lengths)\n    \"stretch\": true,\n    // Inline indicates whether location and time info will be plotted on one line with the bars.\n    \"inline\": true,\n    // Indicates whether to colorize the blocks\n    \"hours12\": false,\n    // Indicates whether to use 12-hour format\n    \"live\": false,\n    // Selects the sorting of the timezones\n    // (one of 'name' - lexicographically, 'offset' - TZ offset, 'none' - user defined)\n    \"sorting\": \"name\",\n    // Indicates whether to keep the local timezone on top when using sorting\n    \"sort_local_top\": true\n}\n```\n\n## Why?\n\nWorking in an international team is a lot of fun, but comes with the challenge of having to deal with timezones. Since I am not good at computing them quickly in my head, I decided to write a simple CLI tool to help me out. I hope it can be useful for other people as well.\nThanks for the inspiration @[sebas](https://github.com/sebastian-quintero)!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmerschformann%2Fgotz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmerschformann%2Fgotz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmerschformann%2Fgotz/lists"}