[Zope] localtime and unauthorized

hohage hohage@muenster.de
Mon, 24 Feb 2003 09:29:32 +0100


I' m testing a website on my local Windows XP Zope 2.3.3 machine.
For a python script that evaluates the current day, I get a authorization 
popup.
I'm logged in as manager.
That's the script:
import time
return 
['Sonntag','Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag'][ti
me.localtime(time.time())[1]]
And that's the traceback:
Unauthorized

.....
File C:\PROGRA~1\Zope2_3\lib\python\Products\PythonScripts\PythonScript.py, 
line 336, in _exec
    (Object: wochentag)
    (Info: ({'script': <PythonScript instance at 0132C650>, 'context': <Folder 
instance at 01328460>, 'container': <Folder instance at 01328460>, 
'traverse_subpath': []}, (), {}, None))
  File Script (Python), line 3, in wochentag
    (Object: time)
  File C:\PROGRA~1\Zope2_3\lib\python\Products\PythonScripts\Guarded.py, line 
273, in __getattr__
  File C:\PROGRA~1\Zope2_3\lib\python\Products\PythonScripts\Guarded.py, line 
150, in __careful_getattr__
    (Object: time)
  File C:\PROGRA~1\Zope2_3\lib\python\AccessControl\SecurityManager.py, line 
144, in validate
  File C:\PROGRA~1\Zope2_3\lib\python\AccessControl\ZopeSecurityPolicy.py, 
line 168, in validate
Unauthorized: localtime

What could be the reason??
I've got no clue.
Is it a windows problem...
Thanks.