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
Schemdule is a tiny tool using script as schema to schedule one day and remind you to do something during a day.

Schemdule is a tiny tool using script as schema to schedule one day and remind you to do something during a day. Platform Python Install Use pip: pip

StardustDL 4 Sep 13, 2021
PyDateWaiter helps waiting special day & calculating remain days till that day with Python code.

PyDateWaiter (v.Beta) PyDateWaiter helps waiting special day(aniversary) & calculating remain days till that day with Python code. Made by wallga gith

wallga 1 Jan 14, 2022
A comparison of mesh generators.

This repository creates meshes of the same domains with multiple mesh generators and compares the results.

Nico Schlömer 29 Dec 12, 2022
This module is for finding the execution time of a whole python program

exetime 3.8 This module is for finding the execution time of a whole program How to install $ pip install exetime Contents: General Information Instru

Saikat Das 4 Oct 18, 2021
This is the old code for bitcoin risk metric, the whole purpose form it is to help you DCA your investment according to bitcoin risk.

About The Project This is the old code for bitcoin risk metric, the whole purpose form it is to help you DCA your investment according to bitcoin risk

BitcoinRaven 2 Aug 3, 2022
A Puzzle A Day Keep the Work Away

A Puzzle A Day Keep the Work Away No moyu again!

P4SSER8Y 5 Feb 12, 2022
Building an Investment Portfolio for Day Trade with Python

Montando um Portfólio de Investimentos para Day Trade com Python Instruções: Para reproduzir o projeto no Google Colab, faça o download do repositório

Paula Campigotto 9 Oct 26, 2021
A python script that changes your desktop background based on current weather and time of the day.

Desktop background wallpaper, based on current weather and time A python script that changes your computer's desktop background based on current weath

Maj Gaberšček 1 Nov 16, 2021
This repository contains each day of Advent of Code 2021 that I've done.

Advent of Code - 2021 I will use this repository as my Advent of Code1 (AoC) repo for the 2021 challenge. I'm changing how I am tackling the problems

Brett Chapin 2 Jan 12, 2022
Tracking development of the Class Schedule Siri Shortcut, an iOS program that checks the type of school day and tells you class scheduling.

Class Schedule Shortcut Tracking development of the Class Schedule Siri Shortcut, an iOS program that checks the type of school day and tells you clas

null 3 Jun 28, 2022
NasaApod - Astronomy Picture of the Day

Astronomy Picture of the Day Get interesting Astronomical pictures with a brief

Shripad Rao 1 Feb 15, 2022
Ahmed Hossam 12 Oct 17, 2022
This is an incredibly powerful calculator that is capable of many useful day-to-day functions.

Description ?? This is an incredibly powerful calculator that is capable of many useful day-to-day functions. Such functions include solving basic ari

Jordan Leich 37 Nov 19, 2022
a lite weight photo editor written in python for day to day photo editing!

GNU-PhotoShop A lite weight Photo editing Program (currently CLI only) written in python3 for day to day photo editing. Disclaimer : Currently we don'

Kunal Sharma 5 May 30, 2022
A collection of daily usage utility scripts in python. Helps in automation of day to day repetitive tasks.

Kush's Utils Tool is my personal collection of scripts which is used to automated daily tasks. It is a evergrowing collection of scripts and will continue to evolve till the day I program. This is also my first python project.

Kushagra 10 Jan 16, 2022
Schemdule is a tiny tool using script as schema to schedule one day and remind you to do something during a day.

Schemdule is a tiny tool using script as schema to schedule one day and remind you to do something during a day. Platform Python Install Use pip: pip

StardustDL 4 Sep 13, 2021
A telegram bot that sends a meme a day, from reddit's top meme of the day

MemeBot A telegram bot that sends a meme a day, from reddit's top meme of the day You can use the bot either with an external scheduler (ex: pythonany

Michele Vitulli 1 Dec 13, 2021
PyDateWaiter helps waiting special day & calculating remain days till that day with Python code.

PyDateWaiter (v.Beta) PyDateWaiter helps waiting special day(aniversary) & calculating remain days till that day with Python code. Made by wallga gith

wallga 1 Jan 14, 2022
pytz Python historical timezone library and database

pytz Brings the IANA tz database into Python. This library allows accurate and cross platform timezone calculations. pytz contains generated code, and

Stub 236 Jan 3, 2023
A Python module that tries to figure out what your local timezone is

tzlocal This Python module returns a tzinfo object with the local timezone information under Unix and Windows. It requires either Python 3.9+ or the b

Lennart Regebro 159 Dec 16, 2022