[Zope-dev] Can't get DateTime from REQUEST. Bizarre or just dumb?

Loren Stafford lstaffor@dynalogic.com
Tue, 29 Feb 2000 19:13:33 -0800


All attempts to access executeAt result in NameError, even tho it's
obviously there. What am I doing wrong?

    > C:\Zope214\bin\lib\pdb.py(868)set_trace()->None
    -> Pdb().set_trace()
    (Pdb) s
    > C:/Zope214\lib\python\Products\ZScheduler\ZEvent.py(100)manage_edit()
    -> self.executeAt=executeAt
    (Pdb) s
    NameError: 'executeAt'
    > C:/Zope214\lib\python\Products\ZScheduler\ZEvent.py(100)manage_edit()
    -> self.executeAt=executeAt
    (Pdb) self.executeAt
    DateTime('1969/12/31  16:00:00 US/Pacific')
    (Pdb) REQUEST.form
    {'title': 'Z Event #4', 'executeAt': DateTime('2000/02/04'), 'data':
'Content-Ty
    pe: text/html\012\012<h1>Bang! Bang?</h1>', 'SUBMIT': 'Change'}
    (Pdb) title
    'Z Event #4'
    (Pdb) data
    'Content-Type: text/html\012\012<h1>Bang! Bang?</h1>'
    (Pdb) executeAt
    *** NameError: executeAt
    (Pdb) DateTime
    <class DateTime.DateTime.DateTime at 8dc1a0>
    (Pdb) executeAt.timeTime
    *** NameError: executeAt
    (Pdb) DateTime('2000/02/04')
    DateTime('2000/02/04')
    (Pdb)

This is from a simple manage_edit method. It's not that different from the
manage_add method, which handles the DateTime just fine. I'm sure it's just
a simple oversight on my part; but I can't see what the problem is. Can you?

-- Thanks
-- Loren