[Python-bugs-list] [Bug #128164] time.localtime(-5.0) -> IOError (errno=22)

noreply@sourceforge.net noreply@sourceforge.net
Tue, 09 Jan 2001 06:33:52 -0800


Bug #128164, was updated on 2001-Jan-09 06:33
Here is a current snapshot of the bug.

Project: Python
Category: Windows
Status: Open
Resolution: None
Bug Group: Platform-specific
Priority: 5
Submitted by: digulla
Assigned to : nobody
Summary: time.localtime(-5.0) -> IOError (errno=22)

Details: Try this:

	import time
	time.localtime (-5.0)

This returns (1969, 12, 31, 23, 59, 55, 2, 365, 0) on Unix and throws an
IOError on Windows. Positive values do work. NOTE: If your TZ is !=
GMT/UTC, then you may have to use larger negative values. Try until you get
a year < 1970.

For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=128164&group_id=5470