[GRASS-dev] dateutil dependency killing GRASS 7

Sören Gebbert soerengebbert at googlemail.com
Wed Oct 17 09:16:31 PDT 2012


Hi,

2012/10/17 Markus Neteler <neteler at osgeo.org>:
> On Wed, Oct 17, 2012 at 2:42 PM, Michael Barton <Michael.Barton at asu.edu> wrote:
>> Thanks very much Soren.
>>
>> Perhaps datetutil is a great thing to have, but until we get the packaging thing worked work it is a big problem at least for Macs. It works without a hitch on my Mac, but I don't know how or where I got dateutil.
>
> Just a simple question: could the /lib/datetime  already available in
> GRASS be used?
> http://grass.osgeo.org/programming7/structDateTime.html
> It also knows about time zones.

Unfortunately not. The string parser of the grass datetime library
only understands the grass specific datum format which is not ISO
compliant. Besides of that the datetime module in Python is much more
powerful and automatically transformed into the correct SQL object in
SELECT, INSERT and UPDATE operations. Also comparison functionality
(<=,>=, !=, ==) of Python datetime objects is easier to use,
especially when the algorithms should work with absolute and relative
(integer objects) time.

The reason why i introduced the dateutil module was to have a
sophisticated time string parser that understands plenty of datum
formats inclusively the correct use of the abstract Python datetime
time zone object. Now we have to do it our-self.

Best regards
Soeren

>
> Markus


More information about the grass-dev mailing list