Code Monkey home page Code Monkey logo

tz's Introduction

๐ŸŒ A time zone helper

tz helps you schedule things across time zones. It's an interactive TUI program that displays time across the time zones of your choosing.

Usage

Run tz with no arguments to show the local time, as well as the UTC time zone. It gets more useful when you pass some time zones to the program, to list those below the local time zone.

For now, you need to select the time zones from the tz_data list. Yes, there are plans to make this friendlier for humans too. You're welcome to file an issue about it. I enjoy reading those.

If you would rather not type the list everytime, you could set an alias for your shell, or use the TZ_LIST environment variable with a semi-colon separated list of tz data zone names (see Configuration below). Command-line arguments trump the environment variable.

Check out tz -h for other flags.

The program will adjust to light and dark terminals themes.

Installing

I provide linux/amd64 builds for "official" releases, and you can build from source for your favorite architecture. Kind souls have also packaged the program for other OSes.

Packages

Brew

Brew has a tz package: brew install tz

Archlinux

If you're an Archlinux user, packages are also available:

  • tz follows releases and,
  • tz-git builds the main git branch.

Configuration

The tz program uses standard time zones as described here. You should specify what time zones to display by setting the TZ_LIST environment variable. The local time is always displayed first. To display your local time, the time in California, and the time Paris, you have to set TZ_LIST to US/Pacific;Europe/Paris

Zone Alias

The TZ_LIST env. variable recognizes items from the standard tz database names, but you can alias these, using a special value: use the standard name followed by , and your alias. For example:

TZ_LIST="Europe/Paris,EMEA office;US/Central,US office"

Building

You need a recent-ish release of go with modules support:

git clone https://github.com/oz/tz
cd tz
go build

Testing

go test -cover

Contributing

Please do file bugs, and feature requests. I am accepting patches too, those are the best, but please, open an issue first to discuss your changes. ๐Ÿ˜„

License

The GPL3 license.

Copyright (c) 2021-2022 Arnaud Berthomier

tz's People

Contributors

oz avatar meowgorithm avatar wizardishungry avatar mamachanko avatar rthomas avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.