Date format doesn't support localization

Bug #1274144 reported by Doug Fish
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Confirmed
Low
Unassigned

Bug Description

On the Admin/Overview panel (and likely others),the date format cannot be localized. It appears to be hardcoded to the ISO format. (YYYY-MM-DD).

Tags: i18n
Changed in horizon:
status: New → Confirmed
David Lyle (david-lyle)
Changed in horizon:
importance: Undecided → Low
Revision history for this message
Doug Fish (drfish) wrote :

I'm looking at the code here and thinking about what needs to happen to support a date format. One of the obstacles is going to be that javascript and python don't use the same syntax for formatting dates. I hope to find a subset of python date formats for which I can generate and equivalent javascript format. Are there other known/obvious obstacles I'm going to encounter?

Changed in horizon:
assignee: nobody → Doug Fish (drfish)
Revision history for this message
Doug Fish (drfish) wrote :

We have hardcoded several places the date format of '%Y-%m-%d', however the date picker describes the same format as 'yyyy-mm-dd'. The key to this problem is to sort out how a date format can be consistently represented across our Django, Angular, and other javascript code.

Changed in horizon:
assignee: Doug Fish (drfish) → nobody
Changed in horizon:
assignee: nobody → Kanchan Gupta (kanchan-gupta1)
Revision history for this message
Swati Sharma (swati-shukla1) wrote :

Hi,

I would like to propose a better way-out for this.
In 'User Settings' section, there will be a drop-down which lists all the date-time formats possible.
Each user selects his preferred format, which will be applicable in the Overview panel.

Kindly suggest if this suits fine.

Revision history for this message
Matthias Runge (mrunge) wrote :

Swati, the issue is, data can not be stored somewhere. If you want this, you need to configure a database, which horizon does not use.
Other solution: store in keystone (preferred, but imho not implemented yet)

Changed in horizon:
assignee: Kanchan Gupta (kanchan-gupta1) → nobody
Danny.Ho (dannyh)
Changed in horizon:
assignee: nobody → Danny.Ho (dannyh)
Danny.Ho (dannyh)
Changed in horizon:
assignee: Danny.Ho (dannyh) → nobody
vaibhav (vaibhav-j10)
Changed in horizon:
assignee: nobody → vaibhav (vaibhav-j10)
vaibhav (vaibhav-j10)
Changed in horizon:
assignee: vaibhav (vaibhav-j10) → nobody
Doug Fish (drfish)
tags: added: i18n
Adriano (dritec)
Changed in horizon:
assignee: nobody → Adriano (dritec)
Revision history for this message
Akihiro Motoki (amotoki) wrote :

Clean assignee due to inactivity

Changed in horizon:
assignee: Adriano (dritec) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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