tsiconv
tsiconv is a cli tool I created to take an input time and convert to UTC (optionally a destination timezone).
Many tools I ran accross log in UTC time. Additionally SOC's are now run by people in different timezones including PST, MST, EST, CST, or international timezones in Africa, India, Europe, Asia.0
Installation
I highly recommend you use pipx to install this, as it creates the virtualenv for you and seamlessly handles the loading of the virtual environment when running this tool. If you choose not to use pipx, you should create a virtualenv and possibly a wrapper script to launch this in the virtualenv.
pipx install tsiconv
Usage
The following is the help for the program
usage: __main__.py [-h] [-V] [-v] -t TIME [-s SOURCE] [-d DESTINATION] [-l]
a program to convert timezones
ex: python tsiconv.py
optional arguments:
-h, --help show this help message and exit
-V, --version show program's version number and exit
-v, --verbose
-t TIME, --time TIME A datetime to convert. This should be in ISO-8601 format
-s SOURCE, --source SOURCE
A source timezone to translate from. Only required if --time is a naive format
-d DESTINATION, --destination DESTINATION
A destination timezone to translate from
-l, --list List out the timezones supported by this application
Without providing a destination timeformat, the default is to convert to UTC.
Examples
# print help/usage
tsiconv -h
# print all available timezone formats
tsiconv -l
# Convert from Central European Time to Eastern Standard Time
tsiconv -t "2011-12-03T10:15:30+01:00" -d America/New_York
# Convert from Central Standard Time to Eastern Standard Time
tsiconv -t "2011-12-03T10:15:30" -s America/Chicago -d America/New_York
# Convert to UTC verbosely
tsiconv -v -t "2011-12-03T10:15:30+05:00"
Credits
This package was created with Cookiecutter and the tbennett6421/pythoncookie project template.
Release files for tsiconv 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tsiconv-1.0.0.tar.gz | 4.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tsiconv-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.9 kB
Release files / tsiconv-1.0.0.tar.gz
| Download URL | tsiconv-1.0.0.tar.gz |
|---|---|
| Size | 4.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fc9b5989e238d9ee956ed591241695d5d2ebc20bfcb04756a410517353d5cffc
|
|
BLAKE2b-256 checksum How to use checksums |
b479a7a1fe814c452e5350ea2084fc7a3afbfd6681dc86979ed29c5b7f807eea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.10 CPython/3.8.10 Linux/4.4.0-19041-Microsoft
|
Release files / tsiconv-1.0.0-py3-none-any.whl
| Download URL | tsiconv-1.0.0-py3-none-any.whl |
|---|---|
| Size | 4.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0db2c00bb902ba5f62236e77302d53b9443f709f83b66bd61bf7115ba0b6509b
|
|
BLAKE2b-256 checksum How to use checksums |
27c77eb8589ae4b2d16038cf0e40a6c9de7b447b9b7847e1f2dcccf7e84685c1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.10 CPython/3.8.10 Linux/4.4.0-19041-Microsoft
|