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
Tools for collecting social media data around focal events

Social Media Focal Events The focalevents codebase provides tools for organizing data collected around focal events on social media. It is often diffi

Ryan Gallagher 80 Nov 28, 2022
Nick Craig-Wood's Website

Nick Craig-Wood's public website This directory tree is used to build all the different docs for Nick Craig-Wood's website. The content here is (c) Ni

Nick Craig-Wood 2 Sep 02, 2022
Easy way to build a SaaS application using Python and Dash

EasySaaS This project will be attempt to make a great starting point for your next big business as easy and efficent as possible. This project will cr

xianhu 3 Nov 17, 2022
Мой первый калькулятор!!!!!!

my_first_calculator Первый калькулятор созданный мною на питоне Версия калькулятора: 0.0.4 Как скачать? TERMUX Для скрипта нужен питон, скачиваем pkg

Lesha Russkiyov 2 Dec 29, 2021
A partial-transpiler that converts a subset of Python to the Folders esoteric programming language

Py2Folders A partial-transpiler that converts a subset of Python to the Folders esoteric programming language Folders Folders is an esoteric programmi

Daniel Johnson 1 Dec 23, 2021
🔵Open many google dorks in a fasted way

Dorkinho 🔵 The author is not responsible for misuse of the tool, use it in good practices like Pentest and CTF OSINT challenges. Dorkinho is a script

SidHawks 2 May 02, 2022
A system for assigning and grading notebooks

nbgrader Linux: Windows: Forum: Coverage: Cite: A system for assigning and grading Jupyter notebooks. Documentation can be found on Read the Docs. Hig

Project Jupyter 1.2k Dec 26, 2022
A simple streamlit webapp with multiple functionality

A simple streamlit webapp with multiple functionality

Omkar Pramod Hankare 2 Nov 24, 2021
This is an online course where you can learn and master the skill of low-level performance analysis and tuning.

Performance Ninja Class This is an online course where you can learn to find and fix low-level performance issues, for example CPU cache misses and br

Denis Bakhvalov 1.2k Dec 30, 2022
Moji sends text and fun facts from different APIs wit da use of a notification deamon

Moji sends text and fun facts from different APIs wit da use of a notification deamon. Can be runned via dmenu or rofi.

kshly 2 Jan 12, 2022
Ahmed Hossam 12 Oct 17, 2022
Freeze your objects in python

gelidum Freeze your objects in python. Latin English Caelum est hieme frigidum et gelidum; myrtos oleas quaeque alia assiduo tepore laetantur, asperna

Diego J. 51 Dec 22, 2022
An Android app that runs Elm in a webview. And a Python script to build the app or install it on the device.

Requirements You need to have installed: the Android SDK Elm Python git Starting a project Clone this repo and cd into it: $ git clone https://github.

Benjamin Le Forestier 11 Mar 17, 2022
WordPress-style shortcodes for Python

Python Shortcodes WordPress-style shortcodes for Python Create and use WordPress-style shortcodes in your Python based app. Example # static output de

Bob 1 Dec 22, 2021
A Kodi add-on for watching content hosted on PeerTube.

A Kodi add-on for watching content hosted on PeerTube. This add-on is under development so only basic features work, and you're welcome to improve it.

1 Dec 18, 2021
Herramienta para poder automatizar reuniones en Zoom.

Crear Reunión Zoom con Python Herramienta para poder automatizar reuniones en Zoom. Librerías Requeridas Nombre Comando PyAutoGui pip install pyautogu

JkDev 3 Nov 12, 2022
A Python wrapper API for operating and working with the Neo4j Graph Data Science (GDS) library

gdsclient NOTE: This is a work in progress and many GDS features are known to be missing or not working properly. This repo hosts the sources for gdsc

Neo4j 100 Dec 20, 2022
Force you (or your user) annotate Python function type hints.

Must-typing Force you (or your user) annotate function type hints. Notice: It's more like a joke, use it carefully. If you call must_typing in your mo

Konge 13 Feb 19, 2022
Small projects for python beginners.

Python Mini Projects For Beginners I recently started doing the #100DaysOfCode Challenge in Python. I've used Python before, but I had switched to JS

Sreekesh Iyer 10 Dec 12, 2022
A bash-like intrepreted language

A Bash-like interpreted scripting language.

AshVXmc 1 Oct 28, 2021