The time module in both python2.4 and python2.5 is in error. The documented variables "altzone, daylight, timezone, tzname" are all missing which causes the strptime() function to fail.

Here are some details with a simple repeatable test showing the problem ...

root@OpenWrt:~/bin# python2.4
Python 2.4.4 (#1, Feb 28 2007, 22:55:52)
[GCC 3.2.3 with Broadcom modifications] on linux2
Type "help", "copyright", "credits" or "license" for more information.

>>> import time

First, here is an extract from help(time) ...
Variables:

timezone -- difference in seconds between UTC and local standard time
altzone -- difference in seconds between UTC and local DST time
daylight -- whether local time should reflect DST
tzname -- tuple of (standard time zone name, DST time zone name)

That's what *should* be there. Now dir() shows what *is* there ...
>>> dir(time)
['__doc__', '__file__', '__name__', 'accept2dyear', 'asctime', 'clock', 'ctime', 'gmtime', 'localtime', 'mktime', 'sleep', 'strftime', 'strptime', 'struct_time', 'time']

So the 4 variables are missing.

Here is my test which fails ...
>>> time.strptime('20080116091056',"%Y%m%d%H%M%S")
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/opt/lib/python2.4/_strptime.py", line 269, in ?
_TimeRE_cache = TimeRE()
File "/opt/lib/python2.4/_strptime.py", line 188, in __init__
self.locale_time = LocaleTime()
File "/opt/lib/python2.4/_strptime.py", line 77, in __init__
self.__calc_timezone()
File "/opt/lib/python2.4/_strptime.py", line 168, in __calc_timezone
no_saving = frozenset(["utc", "gmt", time.tzname[0].lower()])
AttributeError: 'module' object has no attribute 'tzname'

I first noticed this in python2.5. I have since removed it and installed python2.4, only to find the same problem there.

Is this the correct way to draw attention to this bug? I haven't been able to find any other way of getting this to anyone involved in producing the package.

Thanks in anticipation