Skip to content

Use python-dateutil instead of python-aniso8601 #89

@ajblum

Description

@ajblum

I see that python-aniso8601 is being used so its installation is required. I would ask, can dateutil.parser (python-dateutil) be used instead ?

I've run a quick test after this change to conversions/iso8601.py and it looks as though timestamps for statements are posted to the LRS in utc:

[root@localhost conversions]# diff iso8601-old.py iso8601-new.py 
24c24,25
< import aniso8601

---
> #import aniso8601
> import dateutil.parser
204c205,206
<             return aniso8601.parse_datetime(value)

---
>             #return aniso8601.parse_datetime(value)
>       return dateutil.parser.parse(value)

My selfish reason for wanting this is that dateutil is available with RHEL's python without adding in extra software via pip (beyond TinCanPython). I also see that there is some community input on this - http://stackoverflow.com/questions/127803/how-to-parse-an-iso-8601-formatted-date-in-python.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions