Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sanwebinfo/timezone
Search the country name or timezone to get the current date and time.
https://github.com/sanwebinfo/timezone
csv json pythnon python3 sqlite3 timezone timezone-conversion timezones
Last synced: 26 days ago
JSON representation
Search the country name or timezone to get the current date and time.
- Host: GitHub
- URL: https://github.com/sanwebinfo/timezone
- Owner: sanwebinfo
- License: mit
- Created: 2024-02-28T12:51:24.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-03-05T10:05:41.000Z (10 months ago)
- Last Synced: 2024-03-06T08:47:12.097Z (10 months ago)
- Topics: csv, json, pythnon, python3, sqlite3, timezone, timezone-conversion, timezones
- Language: Python
- Homepage:
- Size: 72.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Timezone
[![test](https://github.com/sanwebinfo/timezone/actions/workflows/test.yml/badge.svg)](https://github.com/sanwebinfo/timezone/actions/workflows/test.yml)
Search the country name or timezone to get the current date and time.
## usage
- Require Python 3
- Download and run it (it use JSON data as fallback database from external Source)```sh
## Download the script file
wget https://raw.githubusercontent.com/sanwebinfo/timezone/main/wt.py## Run the CLI
python wt.py```
- install locally
- it uses the sqlite3 database from locally installed source```sh
## Clone the Repo
git clone https://github.com/sanwebinfo/timezone.git
cd timezone## install Modules
python -m pip install -r requirements.txt## Run the CLI
python wt.py```
- Downlaoad timezone database
```sh
## Download database file
curl -sSLfOJ https://github.com/sanwebinfo/timezone/raw/main/database/country.db## specify the path of the database file
python wt.py ./your_directory/country.db```
- Learn more about this timezone search CLI
```sh
python wt.py -h
```## Database
- all the timezone and country zone name was stored in the folder `/database`
- stored as `db`, `JSON`, and `CSV` data files
- Database was built using sqlite3, pytz and pycountry Module## LICENSE
MIT