tz

command module
v0.6.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 14, 2021 License: GPL-3.0 Imports: 7 Imported by: 0

README

🌐 A time zone helper

tz helps you schedule things across time zones. It is an interactive TUI program that displays time across a few time zones of your choosing.

Usage

Simply run tz with no arguments to show the local time, as well as the UTC time zone. It gets more interesting when you pass a list of time zones to the program, as they are displayed below the current time zone.

For now, you need to select the time zones from the tz_data list, but I plan to make this friendlier for humans too.

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 tz -h out for other flags.

The program will adjust to light and dark terminals themes.

Installing

If a build is provided for you architecture, you can directly grab a release, but no one will be harmed if you build from source, as only linux/amd64 builds are provided for now.

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

TZ uses standard time zones as described here. You can specify what time zones you want displayed by setting the TZ_LIST environment variable. Your local time will always be displayed. So, if you wanted to display local time + time in California, and Paris you would set your TZ_LIST to US/Pacific;Europe/Paris

Zone Alias

tz is configured only through TZ_LIST, and that limits us to the tz database names, but you can alias these names using a special value: the tz name followed by ; and your alias:

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

License

The GPL3 license.

Copyright (c) 2021 Arnaud Berthomier

Documentation

Overview

*

  • This file is part of tz. *
  • tz is free software: you can redistribute it and/or modify it under
  • the terms of the GNU General Public License as published by the Free
  • Software Foundation, either version 3 of the License, or (at your
  • option) any later version. *
  • tz is distributed in the hope that it will be useful, but WITHOUT
  • ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
  • or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
  • License for more details. *
  • You should have received a copy of the GNU General Public License
  • along with tz. If not, see <https://www.gnu.org/licenses/>. *

*

  • This file is part of tz. *
  • tz is free software: you can redistribute it and/or modify it under
  • the terms of the GNU General Public License as published by the Free
  • Software Foundation, either version 3 of the License, or (at your
  • option) any later version. *
  • tz is distributed in the hope that it will be useful, but WITHOUT
  • ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
  • or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
  • License for more details. *
  • You should have received a copy of the GNU General Public License
  • along with tz. If not, see <https://www.gnu.org/licenses/>. *

*

  • This file is part of tz. *
  • tz is free software: you can redistribute it and/or modify it under
  • the terms of the GNU General Public License as published by the Free
  • Software Foundation, either version 3 of the License, or (at your
  • option) any later version. *
  • tz is distributed in the hope that it will be useful, but WITHOUT
  • ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
  • or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
  • License for more details. *
  • You should have received a copy of the GNU General Public License
  • along with tz. If not, see <https://www.gnu.org/licenses/>. *

*

  • This file is part of tz. *
  • tz is free software: you can redistribute it and/or modify it under
  • the terms of the GNU General Public License as published by the Free
  • Software Foundation, either version 3 of the License, or (at your
  • option) any later version. *
  • tz is distributed in the hope that it will be useful, but WITHOUT
  • ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
  • or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
  • License for more details. *
  • You should have received a copy of the GNU General Public License
  • along with tz. If not, see <https://www.gnu.org/licenses/>. *

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL