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.3.2.tar.gz
(445.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
whenareyou-0.3.2-py3-none-any.whl
(449.9 kB
view details)
File details
Details for the file whenareyou-0.3.2.tar.gz.
File metadata
- Download URL: whenareyou-0.3.2.tar.gz
- Upload date:
- Size: 445.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dc3aef8d683e9330a4a54ef266ae8e1b99c7366e9ff2c712c7a4ebd977c14a07
|
|
| MD5 |
f40f74486598e7660c51b905706edde3
|
|
| BLAKE2b-256 |
3a99d87816f9edb08238721e3098dfa7d59807506f7e3e1c56c6f22abae73dae
|
File details
Details for the file whenareyou-0.3.2-py3-none-any.whl.
File metadata
- Download URL: whenareyou-0.3.2-py3-none-any.whl
- Upload date:
- Size: 449.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b3d86c1cdf802cd5abe133da83b4dee5f81e61b9a90496bfe8ab4a73b501eac1
|
|
| MD5 |
29568f1d0703dc4398c3d1804237e0e2
|
|
| BLAKE2b-256 |
5964299432714207fb44d358950dc0fcd68df13f60c5c1bca84270fa49483538
|