[Python-bugs-list] [ python-Bugs-737127 ] time.mktime() year < 1969 broken? time.accept2dyear=0

SourceForge.net noreply@sourceforge.net
Tue, 13 May 2003 08:53:01 -0700


Bugs item #737127, was opened at 2003-05-13 11:52
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=737127&group_id=5470

Category: Python Interpreter Core
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Rich Landers (rt_landers)
Assigned to: Nobody/Anonymous (nobody)
Summary: time.mktime() year < 1969 broken? time.accept2dyear=0

Initial Comment:
I cant seem to get years < 1970 to be accepted by
time.mktime() under ANY circumstances.  From the 
module-time documentation, I thought they should work if I 
set  time.accept2dyear= 0 and/or used 4-digit years.

My platform is Python 2.2.2 on Windows 2000.
I also have Mark Hammond's "win32all-152" installed.

The attached test behaves the same way on
Python 2.2.1 on Linux (RedHat 8.0)

Summary:

time.accept2dyear =  0
tmtuple =  [1969, 1, 1, 0, 0, 0, 0, 1, -1]
time.mktime(tmtuple) = 

Traceback (most recent call last):
  File "timetest.py", line 24, in testMkTime
    print 'time.mktime(tmtuple) = ', time.mktime(tmtuple)
OverflowError: mktime argument out of range



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

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