Gets the timezone of any location in the world
Project description
Gets the timezone of any location in the world.
This uses google and caches the results so that you can hopefully stay outside the free rate limit (which I have no idea how high it is).
This is how you use it:
$ pip install whenareyou $ ipython In [1]: from whenareyou import whenareyou In [2]: tz = whenareyou('Hamburg') In [3]: tz Out[3]: <DstTzInfo 'Europe/Berlin' LMT+0:53:00 STD> In [4]: from datetime import datetime In [5]: tz.localize(datetime(2002, 10, 27, 6, 0, 0)) Out[5]: datetime.datetime(2002, 10, 27, 6, 0, tzinfo=<DstTzInfo 'Europe/Berlin' CET+1:00:00 STD>) In [6]: tz.localize(datetime(2002, 10, 27, 6, 0, 0)).isoformat() Out[6]: '2002-10-27T06:00:00+01:00'
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
whenareyou-0.2.1.tar.gz
(445.0 kB
view details)
Built Distribution
whenareyou-0.2.1-py3-none-any.whl
(449.7 kB
view details)
File details
Details for the file whenareyou-0.2.1.tar.gz
.
File metadata
- Download URL: whenareyou-0.2.1.tar.gz
- Upload date:
- Size: 445.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4f377240f6ec495cc207d65b6e7604b45a8d5f72bd8d3db2711543ce4a4c451 |
|
MD5 | 1f6906f7332693749ba68c75ee396074 |
|
BLAKE2b-256 | 38b517b0d1ecd9aeb988a89178afa7848e82afc18269a6d61bc97c9c62d64415 |
Provenance
File details
Details for the file whenareyou-0.2.1-py3-none-any.whl
.
File metadata
- Download URL: whenareyou-0.2.1-py3-none-any.whl
- Upload date:
- Size: 449.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 60110e225cb17d5b9624859036989fa118efafba6978c1d909e7df58c268132c |
|
MD5 | 5351508210e723f0339bf1083aaa9a80 |
|
BLAKE2b-256 | 327c348a8675ac2d5a7991739279bef1b2c6792ffb61f16118dcd5f316713ceb |