Whole-day timezone comparison

Overview

Timezone Converter

Compare a full day of your local timezone with foreign ones


integration status deployment status pre-commit.ci status python version latest release code style

$ timezone-converter tijuana --zone $ timezone-converter tijuana new_york
comparison between two timezones with zone info comparison between three timezones

Motivation

When working with people that are not in your local timezone, the available resources are the usual webpages that only show one hour at a time, which is pretty inconvenient.

With this package you can quickly compare a full day of your timezone against foreign ones.

Installation

pip install -U timezone-converter

Usage

timezone-converter <timezone> [<timezone> ...]

Features

Comparison between multiple timezones

Multiple timezones can be provided to get a side-by-side comparison.

Current hour highlighting

The row containing the current hour will be highlighted.

Output a single hour

Using the --single argument, you can output a single hour. If you don't provide a value, the current hour will be displayed.

List of available timezones

Using the --list argument, you can see a pretty list of available timezones, by groups, and sorted alphabetically.

$ timezone-converter --list

list of available timezones

License

This project is licensed under the terms of the MIT license.

Comments
  • Add automated Docker image build and push to the `deployment` workflow

    Add automated Docker image build and push to the `deployment` workflow

    • The image should be pushed to this repo: https://hub.docker.com/r/bledy/timezone-converter (I guess we would need a secret, for example DOCKER_HUB_TOKEN).
    • The image should use the same tag as the release that triggered the workflow (without the v prefix)
    enhancement good first issue hacktoberfest hacktoberfest-accepted 
    opened by ibLeDy 6
  • Output specified letter groups in --list

    Output specified letter groups in --list

    Trying to fix #19

    Usage:

    # List all letter groups
    $ timezone-converter --list
    # List timezones beginning with 'm'
    $ timezone-converter --list m
    # List timezones beginning with 'b', 'd', or 't'
    $ timezone-converter --list bdt
    
    opened by Badboy-16 6
  • Added a command line option to output a single hour

    Added a command line option to output a single hour

    I tried to fix #3

    I added the -s (--single) option to the command line input and enabled the programme to output a single hour.

    Usage: Output a single hour for current time.

    $ timezone-converter hong_kong tokyo -s now
    $ timezone-converter hong_kong tokyo --single now
    

    Output a given hour specified by the user (e.g. 16).

    $ timezone-converter hong_kong tokyo -s 16
    $ timezone-converter hong_kong tokyo --single 16
    
    enhancement 
    opened by Badboy-16 6
  • Add a search option to the cli

    Add a search option to the cli

    This would add a --search option to the cli, which can be used to search timezones by name.

    Examples:

    $ timezone-converter --search "new york"
    Found 1 timezone: "new_york"
    
    $ timezone-converter --search mad
    Found 2 timezones: "madeira", "madrid"
    
    enhancement hacktoberfest 
    opened by ibLeDy 4
  • Sort output by least difference

    Sort output by least difference

    When the user inputs multiple timezones, we could sort the output so after the local timezone there's always the one that has the least difference.

    • We should try to preserve the user order, so if there's no difference we use the input order.

    • We may also add an argument to preserve the user order even if the sorted output would be different. Maybe we can use--preserve-order or --no-sort? Or maybe even have this feature as an opt-in via --order

    For example, in the following screenshot, new_york has less difference than tijuana, so the sorted output would be:

    1. local
    2. new_york
    3. tijuana

    screenshot

    enhancement hacktoberfest 
    opened by ibLeDy 4
  • Output close matches when the timezone argument is not correct

    Output close matches when the timezone argument is not correct

    When the user inputs a timezone that is not in the list, we should fuzzy search for similar ones to offer a suggestion.

    We can also have a fuzzy search capability in case the --list option is not useful enough

    enhancement good first issue hacktoberfest 
    opened by ibLeDy 3
  • Added new feature for showing time-zone difference in hrs

    Added new feature for showing time-zone difference in hrs

    Added new feature for showing time-zone differences with the local and the timezone entered by the user in hours. It also shows whether the user's time is ahead or behind the timezone entered.

    opened by 26tanishabanik 1
  • Added highlight for the row with the current local time

    Added highlight for the row with the current local time

    Fixed #12

    Using the text formatting tool in rich, I added some code to highlight the row with current hour in red. Please let me know if other colours/formats are preferred and I may change the highlight. :)

    opened by Badboy-16 1
  • Replace unmaintained `upload-release-asset` action

    Replace unmaintained `upload-release-asset` action

    The action we are currently using to upload assets to a release is not being actively maintained, so we need to replace it.

    We recently replaced https://github.com/actions/create-release with https://github.com/softprops/action-gh-release, which already has the option to upload assets (it would also allow us to do it in a single step).

    enhancement 
    opened by ibLeDy 1
  • Wrong timezone for GMT+-X conversion

    Wrong timezone for GMT+-X conversion

    Issue:

    The timezone output of the gmt+x and gmt-x seems to be swapped. For the reference, Hong Kong is in GMT+8.

    Step to reproduce:

    $ timezone-converter --version
    timezone-converter 0.12.1
    
    $ timezone-converter hong_kong gmt-5 gmt+5
    
    ┏━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━┓
    ┃      LOCAL       ┃  ASIA/HONG_KONG  ┃    ETC/GMT-5     ┃    ETC/GMT+5     ┃
    ┡━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━┩
    │ 2022-11-24 00:00 │ 2022-11-24 00:00 │ 2022-11-23 21:00 │ 2022-11-23 11:00 │
    │ 2022-11-24 01:00 │ 2022-11-24 01:00 │ 2022-11-23 22:00 │ 2022-11-23 12:00 │
    │ 2022-11-24 02:00 │ 2022-11-24 02:00 │ 2022-11-23 23:00 │ 2022-11-23 13:00 │
    │ 2022-11-24 03:00 │ 2022-11-24 03:00 │ 2022-11-24 00:00 │ 2022-11-23 14:00 │
    │ 2022-11-24 04:00 │ 2022-11-24 04:00 │ 2022-11-24 01:00 │ 2022-11-23 15:00 │
    ...
    
    
    opened by Edwardhk 0
  • Add difference functionality

    Add difference functionality

    I quickly implemented a solution to #18 issue yet I could not follow up your whole conversation so I do not know if this problem has been already resolved or not. Nevertheless, this is my idea.

    Changes in main.py I added new flag for showing differences --difference as an argument to argparser. I had to add new argument to ComparisonView object.

    Changes in comparison_view.py I had to introduce new parameter to ComparisonView in order the difference would work (it follows the design for --zone). I also had to adjust _get_header method for the new functionality. And finally I add method _difference_string which computes the difference between time zones and returns string containing that difference.

    opened by JamieBaird 2
  • Better argument name to output a single hour

    Better argument name to output a single hour

    I think we should change the argument to something like --hour. Initially we used -s/--single to avoid collision with -h (help) argument. Hour seems more appropiate, but suggestions are welcome.

    The initial work was discussed in #3, and done in #16.

    enhancement good first issue 
    opened by ibLeDy 0
  • Suggestion: shorter programme name in command line

    Suggestion: shorter programme name in command line

    It's such a pleasure to use and work on this amazing project and thanks @ibLeDy for your work. 🎉

    Just a suggested change from my experience of working on this project.

    I sometimes find the programme name (timezone-converter) too long to type in the command line when testing my PR or running the programme. It would be nice to use a shorter name like tz-conv or tz-convert (can be anything). The current repo name can still remain unchanged.

    For example, timezone-converter --list can possibly be tz-conv --list

    enhancement question 
    opened by Badboy-16 1
  • Show difference in hours

    Show difference in hours

    We can show what the hour difference is, maybe where we show the --zone.

    • It can be just a number, but I think we should use gmt+
    • We can use an argument like --difference
    enhancement good first issue 
    opened by ibLeDy 20
Releases(v0.12.1)
Owner
Iago Alonso
Iago Alonso
A fancy and practical functional tools

Funcy A collection of fancy functional tools focused on practicality. Inspired by clojure, underscore and my own abstractions. Keep reading to get an

Alexander Schepanovski 2.9k Dec 29, 2022
Ingestinator is my personal VFX pipeline tool for ingesting folders containing frame sequences that have been pulled and downloaded to a local folder

Ingestinator Ingestinator is my personal VFX pipeline tool for ingesting folders containing frame sequences that have been pulled and downloaded to a

Henry Wilkinson 2 Nov 18, 2022
Blender addon that simplifies access to useful operators and adds missing functionality

Quick Menu is a Blender addon that simplifies common tasks Compatible with Blender 3.x.x Install through Edit - Preferences - Addons - Install... -

passivestar 94 Dec 27, 2022
Better Giveaways is a bot that will change the experience of using a giveaway bot forever.

Better-Giveaways Better Giveaways is a bot that will change the experience of using a giveaway bot forever. VoxelBotUtils/Novus, latest PyPi releases

Lightning 2 Jan 12, 2022
Statistics Calculator module for all types of Stats calculations.

Statistics-Calculator This Calculator user the formulas and methods to find the statistical values listed. Statistics Calculator module for all types

2 May 29, 2022
A synchronous, single-threaded interface for starting processes on Linux

A synchronous, single-threaded interface for starting processes on Linux

Spencer Baugh 27 Jan 28, 2022
GEGVL: Google Earth Based Geoscience Video Library

Google Earth Based Geoscience Video Library is transforming to Server Based. The

3 Feb 11, 2022
Terminal compatible with ansi-bbs. Meant to be a prototype, but published because why not.

pybbsterm: Terminal emulator for calling BBSs. Use cases (non-exhaustive) Explore terminal protocols. Connect to BBSs. Highlights Python 3.8+ code. Bu

Roc Vallès i Domènech 9 Apr 29, 2022
This is an implementation of NeuronJ work with python.

NeuronJ This is an implementation of NeuronJ work with python. NeuronJ is a plug-in for ImageJ that allows you to create and edit neurons masks. Image

Mohammad Mahdi Samei 3 Aug 28, 2022
sawa (ꦱꦮ) is an open source programming language, an interpreter to be precise, where you can write python code using javanese character.

ꦱꦮ sawa (ꦱꦮ) is an open source programming language, an interpreter to be precise, where you can write python code using javanese character. sawa iku

Rony Lantip 307 Jan 07, 2023
1000+ ready code templates to kickstart your next AI experiment

AI Seed Projects Start with ready code for your next AI experiment. Choose from 1000+ code templates, across a wide variety of use cases. All examples

BlobCity, Inc 98 Jan 03, 2023
Python-Roadmap - Дорожная карта по изучению Python

Python Roadmap Я решил сделать что-то вроде дорожной карты (Roadmap) для изучения языка Python. Возможно, если найдутся желающие дополнять ее, модифиц

Ruslan Prokhorov 1.2k Dec 28, 2022
Shopify Backend Developer Intern Challenge - Summer 2022

Shopify Backend Developer Intern The task is build an inventory tracking web application for a logistics company. The detailed task details can be fou

Meet Gandhi 11 Oct 08, 2022
Fluxos de captura e subida de dados no datalake da Prefeitura do Rio de Janeiro.

Pipelines Este repositório contém fluxos de captura e subida de dados no datalake da Prefeitura do Rio de Janeiro. O repositório é gerido pelo Escritó

Prefeitura do Rio de Janeiro 19 Dec 15, 2022
The fastest way to copy to (not from) high speed flash storage.

FastestCopy The fastest way to copy to (not from) high speed flash storage. This is about 3-6x faster than file copy on explorer.exe to usb flash driv

Derek Frombach 0 Nov 03, 2021
A New, Interactive Approach to Learning Python

This is the repository for The Python Workshop, published by Packt. It contains all the supporting project files necessary to work through the course from start to finish.

Packt Workshops 231 Dec 26, 2022
A collection of some leetcode challenges in python and JavaScript

Python and Javascript Coding Challenges Some leetcode questions I'm currently working on to open up my mind to better ways of problem solving. Impleme

Ted Ngeene 1 Dec 20, 2021
A telegram bot which programed to countdown.

countdown-vi this is a telegram bot which programed to countdown. usage well, first you should specify a exact interval. there is 5 column, very first

Arya Shabane 3 Feb 15, 2022
This repo is a collection of programs and websites templates too

📢 Register here for Hacktoberfest and make four pull requests (PRs) between October 1st-31st to grab free SWAGS 🔥 . IMPORTANT While making pull requ

Binayak Jha - 2 7 Oct 03, 2022
A type based dependency injection framework for Python 3.9+

Alluka A type based dependency injection framework for Python 3.9+. Installation You can install Alluka from PyPI using the following command in any P

Lucina 16 Dec 15, 2022