[Python-checkins] CVS: python/nondist/sandbox/datetime datetime.py,1.50,1.51

M.-A. Lemburg mal@lemburg.com
Tue, 05 Mar 2002 10:42:37 +0100


Tim Peters wrote:
> 
> Update of /cvsroot/python/python/nondist/sandbox/datetime
> In directory usw-pr-cvs1:/tmp/cvs-serv25482
> 
> Modified Files:
>         datetime.py
> Log Message:
> _localtzoffset():  If the given date is out of platform mktime()'s range,
> feed mktime() the same values except for a year that is in its range, and
> with the same leap-year-ness as the given year.  In effect, this imposes
> a "proleptic" DST determination for years outside the platform range.

This fails badly. DST rules change every year and historic DST
switch times as well as future ones are not necessarily 
reliable.

Have a look at the TZ package at ftp://elsie.nci.nih.gov/pub/
for some fun with DST. They update those files many times a
year.

-- 
Marc-Andre Lemburg
CEO eGenix.com Software GmbH
______________________________________________________________________
Company & Consulting:                           http://www.egenix.com/
Python Software:                   http://www.egenix.com/files/python/