[Zope] DateTime and mxDateTime confusion

Alex alex@quad.com.ar
Fri, 18 May 2001 05:05:52 -0300


I've got some big confusion about DateTime objects on zope:

in short:
- zope has a built-in object called DateTime available in 'script (python)'
- python has a 3rd party module mxDateTime which is called the same:
"DateTime"
question is: why did zope developers choose an existing name for that ?!

a more detailed description:
I was trying PsycopgDA (postgresql database adaptor) which converts sql
timestamp fields to DateTime objects and I wanted the floating point number
in UTC of it, so I called it's method timeTime() , but that method didn't
exist. I wanted to be sure the object I was using was really a DateTime
object so I've tried type(myObject) and it did return "DateTime" (note: type
is an external method which returns the python's function type()). I created
a DateTime object doing x = DateTime() and when I call x.timeTime() it
worked, so I've tried type(x) and it also return "DateTime". Both objects
were "DateTime" objects, but one was a zope built-in object called DateTime
and the other was the python's 3rd party module mxDateTime also called
"DateTime"

Using the same object type name on different object types is not what I call
a very intuitive idea. Why did zope go that way?

any comments?

thanks for your [Date] Time =)
Alex Verstraeten