Skip to main content

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'

Release files for whenareyou 0.3.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for whenareyou 0.3.2
File Size Uploaded
whenareyou-0.3.2.tar.gz 445.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for whenareyou 0.3.2
File Interpreter ABI Platform
whenareyou-0.3.2-py3-none-any.whl Python 3 none any Details

Total release size: 895.0 kB

Release files / whenareyou-0.3.2.tar.gz

Download URL whenareyou-0.3.2.tar.gz
Size 445.1 kB
Tags Source
SHA-256 checksum
How to use checksums
dc3aef8d683e9330a4a54ef266ae8e1b99c7366e9ff2c712c7a4ebd977c14a07
BLAKE2b-256 checksum
How to use checksums
3a99d87816f9edb08238721e3098dfa7d59807506f7e3e1c56c6f22abae73dae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / whenareyou-0.3.2-py3-none-any.whl

Download URL whenareyou-0.3.2-py3-none-any.whl
Size 449.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b3d86c1cdf802cd5abe133da83b4dee5f81e61b9a90496bfe8ab4a73b501eac1
BLAKE2b-256 checksum
How to use checksums
5964299432714207fb44d358950dc0fcd68df13f60c5c1bca84270fa49483538
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.3.2 This release

2 release files

0.3.1

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page