[Issues] datetime vs. DateTime

Ewout M. Helmich helmich at astro.rug.nl
Wed Nov 21 14:50:21 CET 2007

Hi Johannes,

This was changed about 2 1/2 months ago, in preparation for moving to 
Python 2.5. This change is necessary because the cx_Oracle code for 
Python 2.5 assumes Python datetimes are used. "DateTime" (mx.DateTime) 
required the installation of "mx" as a Python package, wheras "datetime" 
is native to Python.

Howto's etc. have been updated accordingly.

The Python datetime module does not have as much functionality as 
mx.DateTime, for example it is not aware of Julian dates, AbsDates, and 
it does not parse strings. To offer such functionalities (which we use 
in the code) a number of functions were added to astro/util/utilities.py.


Johannes Koppenhoefer wrote:
> Hi all, 
> I found the DATE_OBS value of my RawBiasFrames to be of some strange type:
> awe> rb = ( RawBiasFrame.instrument.name == 'WFI' )[0]
> awe> type( rb.DATE_OBS )
> <type 'datetime.datetime'>
> in the past it was of type 
> <type 'DateTime'>
> Has something changed or is there a problem with the database? 
> What is the difference between datetime.datetime and DateTime?
> Cheers,
> Johannes
> _______________________________________________
> Issues mailing list
> Issues at astro-wise.org
> http://listman.astro-wise.org/mailman/listinfo/issues


Drs. Ewout Helmich
Kapteyn Astronomical Institute,

Landleven 12
P.O.Box 800
9700 AV Groningen
The Netherlands

email: helmich at astro.rug.nl
tel: +31(0)503634548


More information about the Issues mailing list