CARVIEW |
Select Language
HTTP/2 200
date: Sat, 11 Oct 2025 04:46:32 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
etag: W/"4a7f0ffb72ce6f18485fa8e0eae82bb4"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: no-referrer-when-downgrade
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com github.githubassets.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com wss://alive-staging.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com marketplace-screenshots.githubusercontent.com/ copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=s8aWXNz1TaRGj%2FndsfahX4NyrYHAm0vJ85CKGg2cupO%2F86eo96v%2BxZbJmZIWieNJcXAJSWSE5Ty3sGdCEvpJj0x8QhUwatbxJVqkC0NzbQShhsYfXKW05As3USLREGNtVkrbINmnZOH9P%2B62RkuXc0J7vGMHMfRXNrzBEvbs%2FavS8Hx%2FLrfv5pVKawE1bnGQIEK%2BSsD3urIIl89y2MEhPajSCu%2BNOmlrSQCT%2FV3SjBtoVAIifq2ndrH%2FSd5PSipmJvit2X%2Fu675L4w5jXs3NgQ%3D%3D--T3AuPvvF%2BAPuguIk--VWGXMAT5Qn2N8Onal7t3Kw%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.711639178.1760157991; Path=/; Domain=github.com; Expires=Sun, 11 Oct 2026 04:46:31 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Sun, 11 Oct 2026 04:46:31 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: A8E8:2C8153:2D7690:418803:68E9E127
GitHub - dbaron/tzmap.js: A library for working with the geography of timezones in JavaScript
Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 0
A library for working with the geography of timezones in JavaScript
License
dbaron/tzmap.js
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
# tzmap.js - Library for working with the geography of timezones in JavaScript # Written in 2011 by L. David Baron <dbaron@dbaron.org> # To the extent possible under law, the author(s) have dedicated all # copyright and related and neighboring rights to this software to the # public domain worldwide. This software is distributed without any # warranty. # # You should have received a copy of the CC0 Public Domain Dedication # along with this software. If not, see # <https://creativecommons.org/publicdomain/zero/1.0/>. This is tzmap.js, a library for working with the geography of time zones from JavaScript. This is a companion library to tz.js, providing the geography-related features. It is intended to support applications that want to map locations (latitude/longitude pairs) to time zone names and applications that want to draw maps of time zones. It incorporates data from https://efele.net/maps/tz/ , "A set of shapefiles for the TZ timezones", available under CC0. Files currently in the distribution are: pyshp/ The Python Shapefile Library (under its own license). shapefile-to-json.py Code to construct the JSON data needed by tzmap.js from the tzmap shapefiles. The library has the goal of providing these basic functions: (1) Map a (lat,lon) pair to zero or one timezones. (2) Get the shape outlines for a given timezone to draw the boundaries of a TZ database timezone. (3) Merge the shape outlines for adjacent timezones in order to draw the boundaries of a set of adjacent timezones (eliminating edges that were between two merged zones). This allows drawing maps showing the timezone lines at a given point in time, or maps showing the regions that have a summer time change within a specific period (perhaps coded by the day they change). This has the following implications for data structures: For (1), we want a quick test that allows rapidly eliminating most timezones; this is done by storing the N/E/S/W edges of the smallest rectangle enclosing all of the zone's polygons. For (3), we want each polygon for the zone to be stored as a list of (segment, direction-on-segment) pairs, and each segment to know which one or two zones it separates. Build instructions: * Download the tz_world_mp.zip file from https://efele.net/maps/tz/world/ and place it in ../tzmap/ (or elsewhere, and adjust the path at the top of shapefile-to-json.py) * Run |make| to generate the output in output/ Note that https://github.com/dbaron/timezone-map is a project that uses this library (and the one I wrote it for). It's possible that some code in that repository might make sense being moved in this library.
About
A library for working with the geography of timezones in JavaScript
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published
You can’t perform that action at this time.