Zope+FB+mx - DateTime errrrrrrrror....

fowlertrainer at anonym.hu fowlertrainer at anonym.hu
Thu Jul 15 16:18:16 CEST 2004


Hi !

I think that I have been found a bug in mx.DateTime...
So:
I use FireBird, and in this RDBMS the datetime fields are "doubles".
So if I set them to 0, the values the fields are '1899-12-30 01:00:00'.

When I try to see this datetime as European format (YYYY.MM.DD HH:MM:SS)
I get error.

Example1:
s='1899-12-30 01:00:00'
nv=str(s)
nv=DateTime(s)
s=nv.strftime('%Y.%m.%d. %H:%M:%S')
# it is makes error

Example2:
s='1900.01.01'
nv=str(s)
nv=DateTime(s)
s=str(nv)
# it is not makes error, but show the datetime in other format, not in
needed.

Example3:
s='2002.03.04 05:06:07.00'
nv=str(s)
nv=DateTime(s)
s=nv.strftime('%Y.%m.%d. %H:%M:%S')
# this example don't makes error.

I don't understand it, why CAN the mx convert the datetime to default
format, and why cannot the needed ?

Anybody can helps me ?

Thanx for it:
FT








More information about the Python-list mailing list