[Dev] Date / Time types

Ken Krugler ken at transpac.com
Tue Nov 9 11:11:15 PST 2004


Hi Jeffrey,

>I've forgotten now why exactly we're using mxDateTime instead of the 
>standard Python 2.3 datetime library.  Can someone remind me?  If I 
>didn't know better, I'd say datetime seems adequate as an internal 
>representation for solitary dates.

I don't know the details for the internal decision, but from what 
I've read there are good reasons to use the mx.DateTime module in 
place of the time module. The time module depends heavily on the 
standard C library, which is notorious for inconsistencies across 
platforms. I've recently had to deal with some of these during the 
port of BSD's standard lib to Palm OS, and (if possible) steering 
clear of this code would be a Good Thing.

>We'll need to do localization of dates, it's not clear to me why 
>we'd want to store something like ICU datatypes internally instead 
>of datetime.  Would it be terribly expensive to store standard 
>datetimes internally and use a more complicated package to display?

I don't know how exactly Chandler currently uses date/time values 
internally. From past experience on Mac & Palm, the "time" value is 
something that's saved and compared as an arbitrary value, and the 
real issues with manipulating it have to do with formatting, time 
zones, etc.

So I don't know how much it buys you to use the Python built-in time 
support - but then again I've just started wandering through the code.

-- Ken
-- 
Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200


More information about the Dev mailing list