I quickly decided not to include Daylight Saving Time and timezone information for each city. In looking over what needs to be done, I realized that it's just way too much work for so little in return.
I'm not trying to handle the timezones automatically since ther's no clear-cut method to determine where a timezone is. While nominally the timezones are all 15 degrees apart, one just can't use that fact to determine the timezones since there are regional variations. For instance, Mountain (which is seven hours west of Greenwich) is located between 97°30′W and 112°′W and while it would be nice if one could say, “Yes, White Bird, Idaho, which is located at 116°17′56″ is in the Pacific Time Zone.” But you can't because White Bird is in Mountain, while 28 miles south is Riggins, at 116°18′53″ which is in the Pacific Time Zone (I think—according to my map, the time zone border runs just along the northern edge of Riggins).
It'd be a lot of work to work out which town is in which timezone for a given state if said state actually straddles two timezones (which looks to be about thirteen states).
Daylight Saving Time is a bit easier. Most of the United States follows DST and given that it starts on the last Sunday of April and ends on the last Sunday of October, it's easy enough to check.
But the following areas in the US do not follow DST: Hawaii, Indiana except for Jasper County, Lake County, LaPorte County, Newton County, Porter County (which are in Central Standard Time or Central Daylight Time depending upon the time of year), Dearborn County, Clark County, Floyd County and Harrison County (which are in Easter Standard Time or Easter Daylight Time), Arizona (with the exception of the Navajo Indian Reservation, given it spans three states), American Samoa, Guam, Puerto Rico and the Virgin Islands.
But the history of Daylight Saving Time is interesting and yet maddening (and yes, I do have to track Daylight Saving Time in the past unfortunately). Daylight Saving Time has not always been around although the idea was first presented by Benjamin Franklin. England was the first county to formally encode into law Daylight Saving Time (went into effect May 21, 1916) followed a few years later by the United States (into effect March 31, 1918), and over the following few decades went into and out of law several times. In researching this, I did create the following table of DST dates:
|1776–1917||—||—||US did not have DST at this time.|
|1918||Mar 31||Oct 31||Instituded by Woodrow Wilson for World War I.|
|1919||Mar 31||Oct 31|
|1920–1941||—||—||DST Repealed by US, with the exception of Massachusetts, Rhode Island, New York City, Philadelphia and Chicago|
|1942||Feb 9||—||Franklin Roosevelt signed into law “War Time” which put the US into Daylight Saving Time from Feb 9, 1942 until Sep 30, 1945.|
|1946–1965||—||—||No US law at this time; states and municipalities were free to use DST as they saw fit.|
|1966–1973||last Sunday of April||last Sunday of October|
|1974||Jan 6||Oct 31||Due to the OPEC crisis of 1973, Congress passed the DST Energy Act, which mandated a longer period for DST for the next two years|
|1975||Feb 23||Oct 31||The DST Energy Act was repealed and DST went back to the normal schedule|
|1976–1986||last Sunday of April||last Sunday of October|
|1987-present||first Sunday of April||last Sunday of October||In 1986, Regan signed into law a modification of the DST Act, moving the start of Daylight Saving to the first Sunday of April.|
Determining whether a location observed DST in the past is not easy (unless you know from personal experience) so again, this is left to the user to indicate such information (although from 1987 onwards can be done through software).