Comment 1 for bug 814055

Revision history for this message
truijllo (truijllo) wrote :

In my installation I've fixed django_openstack/templatetags/templatetags/parse_date.py
adding others conversion attempts and changed the routine iterizing attempts

changing _parse_datetime in :

def _parse_datetime(dtstr):
    format_list=[
        "%Y-%m-%dT%H:%M:%S.%f",
        "%Y-%m-%dT%H:%M:%S",
        "%Y-%m-%d %H:%M:%S.%f",
        "%Y-%m-%d %H:%M:%S"
    ]
    for format_attempt in format_list:
        try:
            return datetime.datetime.strptime(dtstr, format_attempt)
        except:
            pass