This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: time.localtime(-5.0) -> IOError (errno=22)
Type: Stage:
Components: Windows Versions:
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: gvanrossum Nosy List: digulla, gvanrossum
Priority: normal Keywords:

Created on 2001-01-09 14:33 by digulla, last changed 2022-04-10 16:03 by admin. This issue is now closed.

Messages (2)
msg2867 - (view) Author: Aaron Optimizer Digulla (digulla) Date: 2001-01-09 14:33
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.
msg2868 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2001-01-09 14:39
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?)
History
Date User Action Args
2022-04-10 16:03:36adminsetgithub: 33683
2001-01-09 14:33:51digullacreate