cv/t
Quick and dirty world clock for the command-line
{ "createdAt": "2017-10-17T23:00:13Z", "defaultBranch": "main", "description": "Quick and dirty world clock for the command-line", "fullName": "cv/t", "homepage": null, "language": "Go", "name": "t", "pushedAt": "2025-12-29T03:24:09Z", "stargazersCount": 32, "topics": [], "updatedAt": "2026-01-07T02:59:41Z", "url": "https://github.com/cv/t"}A quick and simple world clock for the command-line using IATA airport codes.
Installation
Section titled “Installation”Homebrew
Section titled “Homebrew”brew install cv/tap/tFrom source
Section titled “From source”go install github.com/cv/t/cmd/t@latestFrom releases
Section titled “From releases”Download the latest binary from the releases page.
$ t sfo jfkSFO: 🕓 16:06:21 (America/Los_Angeles)JFK: 🕖 19:06:21 (America/New_York)Any IATA airport code can be used, and will pick the timezone of that airport.
Version
Section titled “Version”$ t --versiont v1.0.0 (commit: abc1234, built: 2024-01-01T00:00:00Z)Shell Prompt Mode
Section titled “Shell Prompt Mode”If PS1_FORMAT is set, the output will be compact with no decorations or newline, suitable for shell prompts:
$ echo $(PS1_FORMAT=1 t sfo lon)SFO 17:47 LON 01:47Development
Section titled “Development”Prerequisites
Section titled “Prerequisites”- Go 1.21 or later
Building
Section titled “Building”go build -o t ./cmd/tTesting
Section titled “Testing”# Run all testsmake test
# Run with coveragemake test-cover
# Run with race detectormake test-raceLinting
Section titled “Linting”make lintReleasing
Section titled “Releasing”Releases are automated via GitHub Actions. To create a new release:
git tag v1.0.0git push origin v1.0.0Project Structure
Section titled “Project Structure”t/├── .github/workflows/ # CI and release automation│ ├── ci.yml│ └── release.yml├── cmd/t/ # Main application entry point│ └── main.go├── codes/ # IATA airport code to timezone mapping│ └── iata.go├── internal/clock/ # Core clock display logic│ ├── clock.go│ └── clock_test.go├── .goreleaser.yml # Release configuration├── go.mod├── go.sum└── README.mdLicense
Section titled “License”MIT License - see [LICENSE]!(LICENSE) for details.