https://github.com/aerupt/whenareyou
A python library getting you the timezones of any location in the world.
https://github.com/aerupt/whenareyou
python pytz timezone
Last synced: 2 months ago
JSON representation
A python library getting you the timezones of any location in the world.
- Host: GitHub
- URL: https://github.com/aerupt/whenareyou
- Owner: aerupt
- License: mit
- Created: 2017-02-21T14:07:25.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2021-07-23T06:51:38.000Z (almost 5 years ago)
- Last Synced: 2025-12-15T14:21:27.666Z (6 months ago)
- Topics: python, pytz, timezone
- Language: Python
- Size: 447 KB
- Stars: 4
- Watchers: 3
- Forks: 12
- Open Issues: 5
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
This Package is No Longer Maintained
==========
**Please consider using https://github.com/MrFuppes/whenareyou instead!**
whenareyou
==========
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]:
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=)
In [6]: tz.localize(datetime(2002, 10, 27, 6, 0, 0)).isoformat()
Out[6]: '2002-10-27T06:00:00+01:00'
Contributions
-------------
Please note that I've been founding some companies since starting this project and I don't have enough time to work on it. If you'd like to take over maintenance of this project or you need small contributions to be reviewed, please contact me at lasse@viper.dev .