Global Time Utility (gtime) - A modern, colorful Python CLI utility for global time zone lookup, comparison, and management. It supports fuzzy search, favorites, city comparison, meeting time conversion, and a live/watch mode
Project description
๐ Global Time Utility (gtime)
A modern, colorful Python CLI utility for global time zone lookup, comparison, and management
Sick of Googling time zones every day?! Stop wasting time figuring out the time. ๐ gtime makes it effortless to work across time zones with fuzzy search, favorites, real-time updates, and beautiful terminal output.
โญ Love this project? Give it a star!
If gtime helps you manage time zones more efficiently, please consider giving it a โญ on GitHub! Your support helps us improve and motivates continued development.
โญ Star this project โข ๐ Report issues โข ๐ก Request features
๐ฏ Why gtime?
- โก Lightning fast - Optimized for large city databases
- ๐ Smart search - Fuzzy matching finds cities even with typos
- โค๏ธ Favorites - Save your most-used cities for quick access
- ๐ Live updates - Watch mode for real-time monitoring
- ๐จ Beautiful output - Colorful, rich terminal interface
- ๐ค Meeting helper - Convert meeting times across all favorites with timezone support
- ๐ Global team ready - Supports UTC, EST, PST, JST, CET and more timezones
- ๐ Compare easily - Side-by-side time comparisons
๐ฆ Installation
With uv (recommended)
uv tool install gtime
In a virtual environment
uv venv .venv
source .venv/bin/activate
pip install gtime
From source
git clone https://github.com/savitojs/gtime.git
cd gtime
uv sync
uv run gtime --help
๐ Quick Start
# Get the time in any city
gtime London
# Add cities to your favorites
gtime add Tokyo Singapore "New York"
# See all your favorite cities at once
gtime
# Compare times across multiple cities
gtime compare London Tokyo Sydney
# Find the perfect meeting time
gtime meeting at "2:00 PM"
# Live monitoring mode
gtime watch
๐ฌ Demo
See gtime in action:
Note: Demo recorded in Ghostty. Some command output may appear broken in the GIF, but it works perfectly in real terminal usage. Best experience with Ghostty or Kitty
๐ฏ Features
๐๏ธ City Lookup
- Fuzzy search:
gtime tokyfinds Tokyo - Suggestions: Get helpful suggestions for misspelled cities
- Instant results: Lightning-fast lookups even with huge databases
โญ Favorites Management
gtime add "Los Angeles" Berlin Mumbai # Add multiple cities
gtime remove Tokyo # Remove a city
gtime # View all favorites
๐ Multi-City Comparison
gtime compare London Tokyo "New York" # Compare specific cities
gtime # Show all favorites (sorted by UTC offset)
๐ Meeting Time Conversion
gtime meeting at "10:00 AM" # Convert across favorites
gtime meeting at "15:30" # 24-hour format supported
gtime meeting at "3 PM UTC" # Shows "Coordinated Universal Time (UTC)"
gtime meeting at "9:00 AM EST" # Shows "Eastern Standard Time (EST)"
๐ Live Watch Mode
gtime watch # Monitor all favorites (live updates every 60s)
gtime compare London Tokyo --watch # Watch specific cities
๐ Timezone Support
When you specify a timezone, gtime shows the full timezone name for clarity:
gtime meeting at "10:00 AM JST" # Shows: "Japan Standard Time (JST)"
gtime meeting at "3 PM UTC" # Shows: "Coordinated Universal Time (UTC)"
gtime meeting at "2:00 PM EST" # Shows: "Eastern Standard Time (EST)"
๐ Usage Examples
Basic Usage
# Simple city lookup
gtime Paris
gtime "San Francisco"
gtime mumbai # Case insensitive
# With fuzzy matching
gtime pairs # Finds Paris
gtime newyork # Finds New York
Managing Favorites
# Build your favorite cities list
gtime add London Tokyo "San Francisco" Berlin
gtime add Mumbai # Add one more
gtime # See your collection
# Remove cities you no longer need
gtime remove Berlin
Advanced Features
# Compare multiple cities
gtime compare London Tokyo Sydney Mumbai
# Perfect for planning meetings
gtime meeting at "9:00 AM" # What time is 9 AM across favorites?
gtime meeting at "14:30" # 24-hour format supported
gtime meeting at "3 PM UTC" # Timezone support for global teams
# Real-time monitoring
gtime watch # Live updates every second
๐ฅ๏ธ GNOME Desktop Widget
Display your favorite cities' times directly on your GNOME desktop using the Desktop Widgets (azclock) extension.
Widget Styles
gtime widget # Style A (default) - flags, color-coded time, status
gtime widget a # Same as above
gtime widget b # Grouped by status (Working, Sleeping, etc.)
gtime widget c # Compact cards with hour diff from local
Style A - Flags + color-coded time + status:
๐บ๐ธ New York 23:05 โ Sleeping UTC-4
๐จ๐ฟ Brno 04:05 +1d โ Sleeping UTC+1
๐ฎ๐ณ Delhi 09:35 +1d โ Working UTC+5:30
๐ฆ๐บ Melbourne 14:05 +1d โ Working UTC+11
Style B - Grouped by status:
๐ป Working
๐ฎ๐ณ Delhi 09:35 +1d
๐ฆ๐บ Melbourne 14:05 +1d
๐ค Sleeping
๐บ๐ธ New York 23:05
๐จ๐ฟ Brno 04:05 +1d
Style C - Compact cards:
๐บ๐ธ New York ๐
23:05 โ Sleeping local
๐ฎ๐ณ Delhi ๐
09:35 +1d โ Working +9.5h
Setup with azclock
- Install the Desktop Widgets GNOME extension
- Open Desktop Widgets settings (right-click any widget -> Settings)
- Add a widget and add a Command Label element
- Set the command to:
gtime widget a(orb/cfor other styles) - Enable Polling with interval
60000(1 minute) - Customize font, colors, and position to your liking
A reference dconf config is included at gtime/widget-azclock-sidebar.dconf with the full sidebar layout (clock + weather + gtime).
# Back up your current config first!
dconf dump /org/gnome/shell/extensions/azclock/ > backup.dconf
# Import the sidebar layout
dconf load /org/gnome/shell/extensions/azclock/ < gtime/widget-azclock-sidebar.dconf
Visual Features
- Country flags for every city
- Color-coded time: green = business hours, amber = transitional, blue-grey = sleeping
- Work status indicators: Working, Lunch, Early, Off, Sleeping
- Day difference:
+1d/-1dwhen a city is on a different date - Hour diff from local (Style C): shows
+5h,+9.5h,local
Customizing the Widget Module
The widget logic lives in gtime/widget.py. You can modify styles, add new ones, or adjust colors by editing the style functions (_style_a, _style_b, _style_c). New styles can be registered in the STYLES dict at the bottom of the file.
๐ ๏ธ Development
Using uv (recommended)
uv venv .venv
source .venv/bin/activate
uv sync
# Optional: update lockfile
uv lock
# Run tests
pytest tests/
Running Tests
pytest tests/
Contributing
We welcome contributions! Here's how to get started:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes and add tests
- Run tests:
pytest - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
๐ GitHub Actions
This project includes automated workflows:
- ๐งช Tests: Runs on every push/PR across Python 3.9-3.12
- ๐ฆ Publish: Automatically publishes to PyPI upon new GitHub release
๐ค Support
- ๐ Documentation: Check out our Wiki
- ๐ Bug Reports: Create an issue
- ๐ก Feature Requests: Suggest new features
- ๐ฌ Discussions: Join the conversation
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Show Your Support
If gtime makes your life easier, please consider:
- โญ Starring this repository
- ๐ฆ Sharing it on social media
- ๐ Writing a review
- ๐ค Contributing to the project
Made with โค๏ธ for developers working across time zones
Happy time zone management! ๐
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gtime-0.7.0.tar.gz.
File metadata
- Download URL: gtime-0.7.0.tar.gz
- Upload date:
- Size: 37.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
27f3f16020fc9a3761e306771e8ab376f51c6fb637fd8b120153bfb9dab95392
|
|
| MD5 |
a41941fc2d185c1b962d28f5a16c6cd0
|
|
| BLAKE2b-256 |
6eab4e9b5dac3de70a25c7f3c4f029d831fb8b2163d28eb91000a8bc93e63b61
|
Provenance
The following attestation bundles were made for gtime-0.7.0.tar.gz:
Publisher:
test.yml on savitojs/gtime
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gtime-0.7.0.tar.gz -
Subject digest:
27f3f16020fc9a3761e306771e8ab376f51c6fb637fd8b120153bfb9dab95392 - Sigstore transparency entry: 1078596517
- Sigstore integration time:
-
Permalink:
savitojs/gtime@936e39391c16f26bb4ca9b841a4cea14405f1e1d -
Branch / Tag:
refs/tags/v0.7.0 - Owner: https://github.com/savitojs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
test.yml@936e39391c16f26bb4ca9b841a4cea14405f1e1d -
Trigger Event:
push
-
Statement type:
File details
Details for the file gtime-0.7.0-py3-none-any.whl.
File metadata
- Download URL: gtime-0.7.0-py3-none-any.whl
- Upload date:
- Size: 29.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
68277082adc7defb9c4f471ed61c09e5a125ac5d3a05dbcae6901ffd93ea4be7
|
|
| MD5 |
112fa7b1c0dc5faa743da40eec5e0244
|
|
| BLAKE2b-256 |
398d6c91522e9ca619a8f85f2634e514e91ff177cd0b12a21f05e4f347774a8e
|
Provenance
The following attestation bundles were made for gtime-0.7.0-py3-none-any.whl:
Publisher:
test.yml on savitojs/gtime
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gtime-0.7.0-py3-none-any.whl -
Subject digest:
68277082adc7defb9c4f471ed61c09e5a125ac5d3a05dbcae6901ffd93ea4be7 - Sigstore transparency entry: 1078596545
- Sigstore integration time:
-
Permalink:
savitojs/gtime@936e39391c16f26bb4ca9b841a4cea14405f1e1d -
Branch / Tag:
refs/tags/v0.7.0 - Owner: https://github.com/savitojs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
test.yml@936e39391c16f26bb4ca9b841a4cea14405f1e1d -
Trigger Event:
push
-
Statement type: