Skip to main content
This app provides models to store Timezone data from a couple sources:
  • Timezone Boundary Builder (https://github.com/evansiroky/timezone-boundary-builder) which uses OpenStreetMap data to generate shapefiles as well. You can download timezones.shapefile.zip

  • the Creative Commons Zero shapefile (the _mp version which uses multipolygon fields) published at http://efele.net/maps/tz/world/, as well as a script to load the data into your database. (last version tested was data from May 28, 2016) This data source is no longer maintained by its author.

It’s useful for applications where the user enters times related to a location (i.e. specifying a pickup time for a rental car, or business hours)

It is useful for finding tzids you can feed to datetime and Django from a geometry if you know WHERE that time is.

fixtures/ contains timezones.json which includes an archived copy of the data for the United States for testing purposes. As this data may change, make sure you use the shapefile and not this data for your application.

Tested with Django 1.11 on Python 2.7

INSTALLATION:

To install, add ‘timezones’ to your installed apps and run manage.py migrate

Loading is accomplished by using manage.py load_timezones –path=<path_to_shapefile_directory>`, the app will automatically add the appropriate “tz_world_mp.shp” to the end of the path.

IF you are using the Creative Commons Zero shapefile from efele.net that is no longer being updated, you will need to pass –tz_world to

Metadata

Release files for geodjango-timezones 1.0

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

Source distribution (sdist)

Source distribution for geodjango-timezones 1.0
File Size Uploaded
geodjango-timezones-1.0.tar.gz 626.5 kB Details

Release files / geodjango-timezones-1.0.tar.gz

Download URL geodjango-timezones-1.0.tar.gz
Size 626.5 kB
Tags Source
SHA-256 checksum
How to use checksums
022d65c5fba99dbe6c80d246ee47697e2b6afd360b149b71ebfbceebc4fb7334
BLAKE2b-256 checksum
How to use checksums
893391fb4a482a7f3d2010878081fe7d26628b4dec28ca8f9f78d7f14d945042
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

1.0 This release

1 release file

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