[Zope] DateTime problem

Lennart Regebro regebro at gmail.com
Wed Nov 9 05:32:53 EST 2005


On 11/8/05, cleehoff at austin.rr.com <cleehoff at austin.rr.com> wrote:
> I have the following code that works on one Zope install and does not work
> on another. I would like to be able to use the same code under both, but am
> at a loss as to why there is a difference. I do not control the Zope
> servers running this application. Any help would be appreciated:
>
> On one server, the following code works fine: python:
>  myrecordset[0][0].strftime('%m/%d/%Y')
>
> But, when I move the page template containing that code to a different
> server, the following error is generated:
>
> ============================
> Exception Type AttributeError
> Exception Value 'str' object has no attribute 'strftime'

So, on the second server, you do not get a date time from SQL, but a string.
Seems to me that either the tables are set up differently, or there is
some change in the sql libraries.

I should also take this time to remind you that you are using very old
versions, which have serious amounts of bugs fixed in later versions.
But, yes, upgrading to newer versions is a lot of work.
--
Lennart Regebro, Nuxeo     http://www.nuxeo.com/
CPS Content Management     http://www.cps-project.org/


More information about the Zope mailing list