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
Checkers Project Built Using Python

Checkers Project Built Using Python

Meekness Anyaeche 1 Nov 08, 2021
Python with the scientific stack, compiled to WebAssembly.

Pyodide may be used in any context where you want to run Python inside a web browser.

9.5k Jan 09, 2023
A collection of UIKit components that can be used as a Wagtail StreamField block.

Wagtail UIKit Blocks A collection of UIKit components that can be used as a Wagtail StreamField block. Available UIKit components Container Grid Headi

Krishna Prasad K 13 Dec 15, 2022
A 3-line lisp implementation

Nanolisp The download page of many a language harbors deep senses of forboding, of evil lurking in its native lair. You feel that the language is not

5 Jun 17, 2022
A Sophisticated And Beautiful Doxing Tool

Garuda V1.1 A Sophisticated And Beautiful Doxing Tool Works on Android[Termux] | Linux | Windows Don't Forget to give it a star ❗ How to use ❓ First o

The Cryptonian 67 Jan 10, 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 url shortener with fastapi and tortoise-orm

fastapi-tortoise-orm-url-shortener a url shortener with fastapi and tortoise-orm

19 Aug 12, 2022
Get a list of content on your Netflix My List that is expiring in the next month or two.

Netflix My List Expiring Movies Annoyed at Netflix for taking away your movies? Now you don't have to be! Installation instructions Install selenium C

24 Aug 06, 2022
DNA Storage Simulator that analyzes and simulates DNA storage

DNA Storage Simulator This monorepository contains code for a research project by Mayank Keoliya and supervised by Djordje Jevdjic, that analyzes and

Mayank Keoliya 3 Sep 25, 2022
A Trace Explorer for Reverse Engineers

Tenet - A Trace Explorer for Reverse Engineers Overview Tenet is an IDA Pro plugin for exploring execution traces. The goal of this plugin is to provi

1k Jan 02, 2023
Huggingface package for the discrete VAE used for DALL-E.

DALL-E-Tokenizer Huggingface package for the discrete VAE used for DALL-E.

MyungHoon Jin 5 Sep 01, 2021
Plugin to generate BOM + CPL files for JLCPCB

KiCAD JLCPCB tools Plugin to generate all files necessary for JLCPCB board fabrication and assembly Gerber files Excellon files BOM file CPL file Furt

bouni 566 Dec 29, 2022
An educational platform for students

Watch N Learn About Watch N Learn is an educational platform for students. Watch N Learn incentivizes students to learn with fun activities and reward

Brian Law 3 May 04, 2022
A demo Piccolo app - a movie database!

PyMDb Welcome to the Python Movie Database! Built using Piccolo, Piccolo Admin, and FastAPI. Created for a presentation given at PyData Global 2021. R

11 Oct 16, 2022
CALPHAD tools for designing thermodynamic models, calculating phase diagrams and investigating phase equilibria.

CALPHAD tools for designing thermodynamic models, calculating phase diagrams and investigating phase equilibria.

pycalphad 189 Dec 13, 2022
Our Ping Pong Project of numerical analysis, 2nd year IC B2 INSA Toulouse

Ping Pong Project The objective of this project was to determine the moment of impact of the ball with the ground. To do this, we used different model

0 Jan 02, 2022
Gerador de dafaces

🎴 DefaceGenerator Obs: esse script foi criado com a intenção de ajudar pessoas iniciantes no hacking que ainda não conseguem criar suas próprias defa

LordShinigami 3 Jan 09, 2022
Self sustained producer-consumer(prosumer) policy study using Python and Gurobi

Prosumer Policy This project aims to model the optimum dispatch behaviour of households with PV and battery systems under different policy instrument

Tom Xu 3 Aug 31, 2022
Just messing around with AI for fun coding 😂

Python-AI Projects 🤖 World Clock ⏰ ⚙︎ Steps to run world-clock.py file Download and open the file in your Python IDE. Run the file a type the name of

Danish Saleem 0 Feb 10, 2022
A maubot plugin to invite users to Matrix rooms according to LDAP groups

LDAP Inviter Bot This is a maubot plugin that invites users to Matrix rooms according to their membership in LDAP groups.

David Mehren 14 Dec 09, 2022