date format

Bug #814055 reported by truijllo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
High
Gabriel Hurley

Bug Description

In template /usr/lib/python2.6/site-packages/dashboard/templates/_image_list.html, error at line 10

Caught ValueError while rendering: time data '2011-07-20T14:34:19' does not match format '%Y-%m-%d %H:%M:%S'

in {% for image in images %}

All images have been registered succesfully as described http://wiki.openstack.org/RunningNova/ManualImageRegistration

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

Changed in openstack-dashboard:
status: New → Fix Committed
tags: added: bug conversion date template
truijllo (truijllo)
Changed in openstack-dashboard:
status: Fix Committed → In Progress
Revision history for this message
truijllo (truijllo) wrote :
Devin Carlen (devcamcar)
Changed in openstack-dashboard:
importance: Undecided → High
assignee: nobody → Gabriel Hurley (gabriel-hurley)
milestone: none → diablo-integrated-freeze
Devin Carlen (devcamcar)
Changed in openstack-dashboard:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.