[Python-bugs-list] [Bug #128164] time.localtime(-5.0) -> IOError (errno=22)
noreply@sourceforge.net
noreply@sourceforge.net
Tue, 09 Jan 2001 06:39:23 -0800
Bug #128164, was updated on 2001-Jan-09 06:33
Here is a current snapshot of the bug.
Project: Python
Category: Windows
Status: Closed
Resolution: Invalid
Bug Group: Platform-specific
Priority: 5
Submitted by: digulla
Assigned to : gvanrossum
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.
Follow-Ups:
Date: 2001-Jan-09 06:39
By: gvanrossum
Comment:
Doesn't look like a bug to me. The time module only deals in times since
1/1/1970. What it does for negative values is undefined.
(Why does it bother you?)
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=128164&group_id=5470