[Python-bugs-list] [ python-Bugs-679872 ] Documentation error -- time module

SourceForge.net noreply@sourceforge.net
Mon, 03 Feb 2003 18:33:46 -0800


Bugs item #679872, was opened at 2003-02-03 17:46
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=679872&group_id=5470

Category: Documentation
Group: Python 2.2.2
>Status: Closed
>Resolution: Invalid
Priority: 5
Submitted By: Alfred Morgan (zectbumo)
>Assigned to: Neal Norwitz (nnorwitz)
Summary: Documentation error -- time module

Initial Comment:
Documentation error
http://www.python.org/doc/current/lib/module-time.html

"earlier versions, up to Python 1.5.1 and 1.5.2a1,
would add 1900 to year values below 1900."


...you mean year values below 100.


-alfred


----------------------------------------------------------------------

>Comment By: Neal Norwitz (nnorwitz)
Date: 2003-02-03 21:33

Message:
Logged In: YES 
user_id=33168

After looking at the code, I believe the comment is correct!
 It appears that the value 1800 would be treated as the year
3700.  I guess it's good the behaviour changed. :-)

Before the code was (see Modules/timemodule.c revision r151
in the gettmarg() function):

        if (p->tm_year >= 1900)
                p->tm_year -= 1900;

So if the year passed in was 1800, tm_year would remain
1800.  Since tm_year is "The number of years since 1900" the
value would mean 1900 + 1800 == 3700.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=679872&group_id=5470