[Zope-DB] Problem with TALES DateTime conversion

Charlie Clark charlie@begeistert.org
Tue, 11 Mar 2003 23:52:40 +0100


Dear list,

I seem to have come across a bug in datetime formatting in TALES.

I have dates and timestamps in my database but only seem to be able to 
format timestamps with strftime.

ie.
<br tal:content="python: result.mytimestamp.strftime('%d.%m.%Y')>
works fine when applied to timestamps 

but I get the following error when I apply it to date values

Error Type: TALESError
Error Value: exceptions.IOError on [Errno 22] Invalid argument in "", at 
line 53, column 1

I tried putting the formatting function in a PythonScript and I get the 
same error!

I wonder if this has anything to do with the DA, currently Zpsycopg.

Suggestions?

Thanx very much

Charlie