[Zope] Python2.3 datetime VS Zope DateTime
Sakesun Roykiattisak
sakesun at boonthavorn.com
Fri Mar 26 21:01:21 EST 2004
"__allow_access_to_unprotected_subobjects__"
Yucks !
I've just discovered "management_page_charset" last 2 weeks. My life
with Zope would be much simple if I had aware of its existence from the
beginning.
It's really annoying that there are no systematically way, AFAIK, to
look for information on these obscure tricks.(besides source code and
mailing list, of course)
Thank you, anyway.
zope at netchan.cotse.net wrote:
>I had the same problem before:
>http://marc.theaimsgroup.com/?l=zope&m=107784430723371&w=2 I was
>suggested to use Zope's DateTime, however I don't want to use Zope
>specific stuff where there's a python alternative.
>
>I created a small wrapper around the datetime object:
>
>class dtwrap(datetime):
> __allow_access_to_unprotected_subobjects__ = 1
>
>Wherever I'd pass a datetime 'D' to a zpt, I pass getdwrapper(D)
>instead, where getdwrapper is:
>
>def getdwrapper(d):
> return dtwrap(d.year, d.month, d.day, d.hour, d.minute,
>d.second, d.microsecond)
>
>Anyway, it would be nice if zpt could handle the native python datetime.
>
>Regards,
>Sandor
>
>
More information about the Zope
mailing list