Skip to content

Instantly share code, notes, and snippets.

@peterhurford
peterhurford / ziptime.rb
Created October 29, 2014 05:13
Database of US Zipcodes and their Timezones, as a Ruby Hash
This file has been truncated, but you can view the full file.
# This is a database of zipcodes and their time zones
# by Peter Hurford <http://www.peterhurford.com>
# Coded in an array as zitpime[<zip code>] = [<time offset from UTC>, <DST yes (1) or no (0)>]
# Daylight Savings is March 9 to November 2
# Data retrieved from http://www.boutell.com/zipcodes/ (CSV and SQL available), which in turn retrieved data from the CivicSpace US ZIP Code Database.
# Here, I used Regex to sort the data into a Ruby hash.
# You are free to use this array for your own purposes, just provide attribution.