Bug 842781 - Date is not formatted to locale
Summary: Date is not formatted to locale
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: subscription-manager
Version: 5.9
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: ---
Assignee: Alex Wood
QA Contact: Entitlement Bugs
URL:
Whiteboard:
Depends On:
Blocks: 771748
TreeView+ depends on / blocked
 
Reported: 2012-07-24 15:23 UTC by J.C. Molet
Modified: 2012-08-02 20:58 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-08-02 20:58:59 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description J.C. Molet 2012-07-24 15:23:17 UTC
Description of problem:
The date search field in the subscription manager gui is not localized for any locale setting.

Version-Release number of selected component (if applicable):


How reproducible:
always

Steps to Reproduce:
1. Start up subscription-manager-gui with any valid LANG setting
2. Register to your system
3. Go to the 'All Available Subscriptions' tab
4. Check the format of the search date under: "Show subscription active on:"
  
Actual results:
In the cli-

[root@jmolet-vm0 ~]# LANG="en_US.UTF-8" subscription-manager list --avail
....
Ends:                 	07/23/2013
.....                 ^ locale should be this format

In the gui, the "Show subscription active on:" is always in format '2012-07-24' no matter which LANG you are running.

Expected results:
the "Show subscription active on:" date is always in the right locale format.

Additional info:

Comment 1 RHEL Program Management 2012-07-24 15:38:17 UTC
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux release.  Product Management has
requested further review of this request by Red Hat Engineering, for
potential inclusion in a Red Hat Enterprise Linux release for currently
deployed products.  This request is not yet committed for inclusion in
a release.

Comment 2 Adrian Likins 2012-08-02 20:02:01 UTC
I removed the localized date format intentionally:


commit ea0469db2f2eea176e90f54cf3419a6fd6dc74e9
Author: Adrian Likins <alikins>
Date:   Fri Jul 20 14:00:17 2012 -0400

    Use ISO8601 date format in allsubs tab
    
    Previously we were using the localized date
    format (ala, strftime('%s')) which is lovely,
    but is more or less impossible to parse, even
    by the tools that claim to (for ex, strptime('%x')).
    
    We had worked around this in a few cases, by
    falling back to en_GB localized date format,
    but that was pretty much just a kluge. For
    bonus fun, some of the dates would only
    fail to parse on double digit months. Or for
    some locales, specific months that had
    unicode char's the date parser didn't like.
    In addition, strptime() is especially broken
    on python 2.4 available on RHEL 5 and earlier.
    
    So, enough of that. ISO8601 dates it is.
    
    - remove locale kluge
    - remove unit tests specifically for that kluge
    - add test cases for widgets.DatePicker


Note You need to log in before you can comment on or make changes to this bug.