The Boston Diaries

The ongoing saga of a programmer who doesn't live in Boston, nor does he even like Boston, but yet named his weblog/journal “The Boston Diaries.”

Go figure.

Thursday, October 14, 2004

“Programmically dealing with time can lead to madness … ”

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:

Daylight Saving Time throughout US History
Year(s) Start End Notes
Year(s) Start End Notes
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.
1943
1944
1945 Sep 30
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).

Obligatory Picture

An abstract representation of where you're coming from]

Obligatory Contact Info

Obligatory Feeds

Obligatory Links

Obligatory Miscellaneous

Obligatory AI Disclaimer

No AI was used in the making of this site, unless otherwise noted.

You have my permission to link freely to any entry here. Go ahead, I won't bite. I promise.

The dates are the permanent links to that day's entries (or entry, if there is only one entry). The titles are the permanent links to that entry only. The format for the links are simple: Start with the base link for this site: https://boston.conman.org/, then add the date you are interested in, say 2000/08/01, so that would make the final URL:

https://boston.conman.org/2000/08/01

You can also specify the entire month by leaving off the day portion. You can even select an arbitrary portion of time.

You may also note subtle shading of the links and that's intentional: the “closer” the link is (relative to the page) the “brighter” it appears. It's an experiment in using color shading to denote the distance a link is from here. If you don't notice it, don't worry; it's not all that important.

It is assumed that every brand name, slogan, corporate name, symbol, design element, et cetera mentioned in these pages is a protected and/or trademarked entity, the sole property of its owner(s), and acknowledgement of this status is implied.

Copyright © 1999-2024 by Sean Conner. All Rights Reserved.