opensourceprojects.dev

A broadsheet for software that doesn't ask for your email

Timezone boundary shapes built from OpenStreetMap data
GitHub RepoImpressions3

Project Description

View on GitHub

Mapping the World's Timezones with OpenStreetMap Data

If you've ever had to deal with timezone data in an application, you know the standard IANA timezone database gives you identifiers like America/Los_Angeles but not much in the way of actual geographic boundaries. You might know where a timezone applies in theory, but translating that into a polygon on a map is a different problem entirely. That's exactly what the Timezone Boundary Builder solves—it produces shapefile and GeoJSON data showing the actual boundaries of the world's timezones, built from OpenStreetMap data.

What It Does

This project takes OpenStreetMap data and generates shapefiles with the boundaries of the world's timezones. Each boundary is associated with a single timezone identifier from the IANA timezone database—things like America/Los_Angeles or Asia/Shanghai. The output is a straightforward shape or GeoJSON object with a single attribute called tzid.

The project has been producing releases since October 2016 and aims to stay current with the timezone database. It only creates new releases after the timezone database puts out a new release, though not every IANA release gets a corresponding boundary update—new releases are guaranteed when timezones are created or deprecated, but otherwise they happen on an as-needed basis for bug fixes or boundary improvements.

As of release 2023d, the project produces three variations of timezone boundary data. First, there's a "comprehensive" option that includes all timezone identifiers following the pre-1993 practice of producing at least one zone per country, minus zones lacking supporting evidence. This aligns roughly with the zone.tab file in the timezone database and serves as the foundation for the other variations. There's also a "same since 1970" variation and a "same since now" variation, depending on how you want to handle historical timekeeping changes.

You can also choose whether you want oceans included in the boundaries, and whether you want the output as GeoJSON or Shapefile format.

Why It's Cool

The obvious value here is practical: if you're building any kind of mapping application that needs to show timezone boundaries, you now have a curated, regularly updated dataset to work with. But there's more to appreciate beneath the surface.

It solves the boundary problem that nobody talks about. The IANA timezone database is excellent for determining offsets and DST rules, but it doesn't tell you where one timezone ends and another begins on a map. That's a completely different data problem, and this project fills that gap using OpenStreetMap's crowd-sourced geographic data.

The release numbering scheme shows real thought about compatibility. By tying releases to the IANA timezone database's own release cycle, the project maintains a clear relationship with the upstream data source. When a new IANA release comes out, you know there might be a corresponding boundary update. The project is honest about not always producing a release for every IANA update, which is refreshingly transparent.

Three variations give you flexibility. The comprehensive option is the most inclusive, assuming some pre-1970 data marked as deprecated might actually be correct. The "same since 1970" and "same since now" variations let you choose how much historical accuracy matters for your use case. That's a thoughtful touch—not every application needs to know about timekeeping in 1965.

It's been running for years. Since 2016, this project has been quietly producing releases. That kind of longevity in an open-source project says something about its maintainability and the community's trust in it.

How to Try It

Head over to the GitHub releases page to download the data directly. You'll find releases organized by version number, matching the IANA timezone database release naming convention.

The download options include:

  • timezones.geojson.zip or timezones.shapefile.zip for the comprehensive variation
  • timezones-with-oceans.geojson.zip or timezones-with-oceans.shapefile.zip if you want ocean areas included
  • Similar options for the "same since 1970" and "same since now" variations

Once you've downloaded a release, you can load the GeoJSON or Shapefile into any GIS tool, mapping library like Leaflet or Mapbox, or spatial database like PostGIS. Each feature has a tzid property that matches the IANA timezone identifier, so you can join it with any other timezone data you're working with.

The project's source code is available on GitHub at evansiroky/timezone-boundary-builder if you want to build the data yourself or contribute improvements to the boundary definitions.

Final Thoughts

This isn't a flashy project, and it doesn't pretend to be. It's a focused, practical tool that solves a specific problem: giving developers geographic timezone boundaries they can actually use. If you're building mapping applications, doing geospatial analysis involving timezones, or just want to visualize how the world's timekeeping breaks down geographically, this dataset will save you the enormous effort of trying to derive those boundaries yourself. It's been maintained consistently for years, ties cleanly to the IANA timezone database, and gives you multiple output formats to work with. Sometimes the most valuable open-source projects are the ones that quietly do one thing well.


Follow @githubprojects for more developer tools and open source projects.

Back to Projects
Project ID: c984f259-684d-4af4-80d9-8e91de14f0b7Last updated: July 16, 2026 at 02:45 AM