On 29 Dec 2005, at 04:53, Jamie O'Keefe wrote:

I am trying to get the latest time in a Python Script.

I declare:

   from DateTime.DateTime import DateTime

But when I run:

   t = DateTime().latestTime()


   t = DateTime().Time()

I always get an Insufficient Privileges error.

Instead of trying to import DateTime just call ZopeTime on your context, which will give you back a DateTime object, like so:

t = context.ZopeTime().latestTime()


Zope maillist  -  Zope@zope.org
**   No cross posts or HTML encoding!  **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to