Bug 869028 - Dates are not localised in subscription-manager-gui
Dates are not localised in subscription-manager-gui
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: subscription-manager (Show other bugs)
6.4
Unspecified Unspecified
unspecified Severity medium
: rc
: ---
Assigned To: candlepin-bugs
IDM QE LIST
:
Depends On:
Blocks: 771481
  Show dependency treegraph
 
Reported: 2012-10-22 16:05 EDT by J.C. Molet
Modified: 2012-12-13 17:47 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-12-13 17:47:20 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description J.C. Molet 2012-10-22 16:05:30 EDT
Description of problem:
It seems that the dates are not localized in the correct format in subscription-manager-gui.

Version-Release number of selected component (if applicable):
python-rhsm-1.1.3-1.git.0.4bda2ce.el6.x86_64
subscription-manager-gui-1.1.3-1.git.29.1721610.el6.x86_64
subscription-manager-1.1.3-1.git.29.1721610.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1.  Fire up subscription-manager-gui on rhel6.4 box
2.  Register your system to a candlepin server
3.  Search for subscritpions or look at dates on existing subscriptions
  
Actual results:
The dates seem to be in this format: 10/21/12  or %m/%d/%y
This appears in the following locations: 
- Start and end dates under My Installed Products
- Start and end dates in the contract selection dialog
- End date under My Subscriptions
- Start and end dates under My Subscription Details

Expected results:
When I use python to grab the expected format for my locale I get:
[root@jmolet-vm1 ~]# python -c "import locale;\ locale.setlocale(locale.LC_TIME,'en_US'); print\
locale.nl_langinfo(locale.D_FMT)"

%m/%d/%Y

Logic would seem to follow that my locale be printed in this format when using the gui.

Additionally the cli portion of subscription-manager uses this format and therefore the gui should be the same.
Comment 1 Adrian Likins 2012-12-13 17:47:20 EST
This change is from:

commit ea0469db2f2eea176e90f54cf3419a6fd6dc74e9
Author: Adrian Likins <alikins@redhat.com>
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.