Re: [Zope] DateTime().Time() gets Insufficient Privileges error, why?
--On 29. Dezember 2005 11:57:08 +0100 Jens Vagelpohl <[EMAIL PROTECTED]> wrote: 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() or 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() This also looks scary. Since you don't have to import DateTime you can use it really directly: t = DateTime().latestTime() -aj pgpZfemppssqb.pgp Description: PGP signature ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] DateTime().Time() gets Insufficient Privileges error, why?
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() or 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() jens ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] DateTime().Time() gets Insufficient Privileges error, why?
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() or t = DateTime().Time() I always get an Insufficient Privileges error. I have combed through the archives and the web and as far as I can tell this should work. What am I doing wrong? Thanks! Jamie ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )