[issue2525] class USTimeZone in Doc/includes/tzinfo-examples.py is out of date

Daniel Diniz report at bugs.python.org
Wed Apr 2 21:30:13 CEST 2008


Daniel Diniz <ajaksu2 at users.sourceforge.net> added the comment:

That was a such silly mistake, sorry :)

Updated patch tries to keep the old behavior, but I just found out it's
mostly wrong too (DST start and end days changed a bit in the last 80
years).

>From http://aa.usno.navy.mil/faq/docs/daylight_time.php (quoted below),
I believe the best correctness/simplicity compromise would be:

 1966-1986: from the last Sunday in April to the last Sunday in October
1987-2006: from the first  Sunday in April to the last Sunday in October
2007-: from the last Sunday in March  to the second Sunday in November

Should I try it like that? Or would more attention to detail be better?

quote:
"Although standard time in time zones was instituted in the U.S. and
Canada by the railroads in 1883, it was not established in U.S. law
until the Act of March 19, 1918, sometimes called the Standard Time Act.
The act also established daylight saving time, a contentious idea then.
Daylight saving time was repealed in 1919, but standard time in time
zones remained in law. Daylight time became a local matter. It was
re-established nationally early in World War II, and was continuously
observed from 9 February 1942 to 30 September 1945. After the war its
use varied among states and localities. The Uniform Time Act of 1966
provided standardization in the dates of beginning and end of daylight
time in the U.S. but allowed for local exemptions from its observance.
The act provided that daylight time begin on the last Sunday in April
and end on the last Sunday in October, with the changeover to occur at 2
a.m. local time.

During the "energy crisis" years, Congress enacted earlier starting
dates for daylight time. In 1974, daylight time began on 6 January and
in 1975 it began on 23 February. After those two years the starting date
reverted back to the last Sunday in April. In 1986, a law was passed
that shifted the starting date of daylight time to the first Sunday in
April, beginning in 1987. The ending date of daylight time was not
subject to such changes, and remained the last Sunday in October. The
Energy Policy Act of 2005 changed both the starting and ending dates.
Beginning in 2007, daylight time starts on the second Sunday in March
and ends on the first Sunday in November."

Added file: http://bugs.python.org/file9928/tzinfo-examples2.patch

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2525>
__________________________________


More information about the Python-bugs-list mailing list