[Zope-DB] Z Psycopg and date fields

Kevin Chambers kevin@molingo.com
Wed, 23 Apr 2003 17:52:01 -0700

Hi there--

Zope 2.6 on Debian Testing (Sarge)

I'm struggling with formatting date fields coming from my PostgreSQL DB.

By default the database connection uses mxDateTime, which not a standard 
permitted zope library.  To get mxDateTime I tried entering the following 
__init__.py in a folder in the products directory, but it doesn't stop me from 
getting "You are not allowed to access date in this context" message:

Products.PythonScripts.Utility import allow_module

I also tried allow_module("mxDateTime") and allow_module("mxdatetime")

Psycopg has the option to use the Zope DateTime module, which I'd be fine with, 
except that I get a:

Error Type: AttributeError
Error Value: _year

when there are nulls.

Can anyone help?

Thanks in advance,