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
Yakuake session management

yman is a python script used for saving/restoring yakuake sessions (currently running commands, working directories, environment variables, tab titles)

Szymon Borecki 6 Jun 25, 2022
SmartGrid - Een poging tot een optimale SmartGrid oplossing, door Dirk Kuiper & Lars Zwaan

SmartGrid - Een poging tot een optimale SmartGrid oplossing, door Dirk Kuiper & Lars Zwaan

1 Jan 12, 2022
This module extends twarc to allow you to print out tweets as text for easy testing on the command line

twarc-text This module extends twarc to allow you to print out tweets as text for easy testing on the command line. Maybe it's useful for spot checkin

Documenting the Now 2 Oct 12, 2021
用于导出墨墨背单词的词库,并生成适用于 List 背单词,不背单词,欧陆词典等的自定义词库

maimemo-export 用于导出墨墨背单词的词库,并生成适用于 List 背单词,欧陆词典,不背单词等的自定义词库。 仓库内已经导出墨墨背单词所有自带词库(暂不包括云词库),多达 900 种词库,可以在仓库中选择需要的词库下载(下载单个文件的方法),也可以去 蓝奏云(密码:666) 下载打包好

ourongxing 293 Dec 29, 2022
OTP-Bomber - An otp from MPL ID app, which can be spammed

OTP-Bomber An otp from MPL ID app, which can be spammed Note: Only available on

5 Oct 29, 2022
Social reading and reviewing, decentralized with ActivityPub

BookWyrm Social reading and reviewing, decentralized with ActivityPub Contents Joining BookWyrm Contributing About BookWyrm What it is and isn't The r

BookWyrm 1.4k Jan 08, 2023
Implent of Oracle Base line and Lea-3 Baseline

Oracle-Baseline Implent of Oracle Base line and Lea-3 Baseline Oracle Oracle : This model is used to obtain an oracle with a greedy algorithm similar

Andrew Zeng 2 Nov 12, 2021
A conda-smithy repository for boost-histogram.

The official Boost.Histogram Python bindings. Provides fast, efficient histogramming with a variety of different storages combined with dozens of composable axes. Part of the Scikit-HEP family.

conda-forge 0 Dec 17, 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
Apilytics for Python - Easy API analytics for Python backends

apilytics-python Installation Sign up and get your API key from https://apilytics.io - we offer a completely free trial with no credit card required!

Apilytics 6 Sep 29, 2022
SQL centered, docker process running game

REQUIREMENTS Linux Docker Python/bash set up image "docker build -t game ." create db container "run my_whatever/game_docker/pdb create" # creating po

1 Jan 11, 2022
Python implementation of Newton's Fractal

Newton's Fractal Animates Newton's fractal between two polynomials of the same order. Inspired by this video by 3Blue1Brown. Example fractals can be f

Jaime Liew 10 Aug 04, 2022
A bash-like intrepreted language

A Bash-like interpreted scripting language.

AshVXmc 1 Oct 28, 2021
Code repo for the book "Feature Engineering for Machine Learning," by Alice Zheng and Amanda Casari, O'Reilly 2018

feature-engineering-book This repo accompanies "Feature Engineering for Machine Learning," by Alice Zheng and Amanda Casari. O'Reilly, 2018. The repo

Alice Zheng 1.3k Dec 30, 2022
LPCV Winner Solution of Spring Team

LPCV Winner Solution of Spring Team

22 Jul 20, 2022
Игра реализована с помощью языке python3.9, библиотеки pygame

Игра в танки Игра реализована с помощью языке python3.9, библиотеки pygame. Игра имеет несколько уровней. Правила: есть танки, которые стреляют, есть

1 Jan 01, 2022
An awesome script to convert the University Of Oviedo web calendar to Google or Outlook calendars.

autoUniCalendar Un script en Python para convertir el calendario de la intranet de la Universidad de Oviedo en un calendario de Outlook o Google Calen

Bimo99B9 14 Sep 28, 2022
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
Credit Card Fraud Detection

Credit Card Fraud Detection For this project, I used the datasets from the kaggle competition called IEEE-CIS Fraud Detection. The competition aims to

RayWu 4 Jun 21, 2022
The mock Pokemon Environment I built in 2019 to study Reinforcement Learning + Pokemon

ghetto-pokemon-rl-environment ##NOT MAINTAINED! Fork and maintain yourself. Environment I made back in 2019 to use Pokemon to practice reinforcement l

2 Dec 09, 2021