Red Hat Bugzilla – Bug 869028
Dates are not localised in subscription-manager-gui
Last modified: 2012-12-13 17:47:20 EST
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):
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
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
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\
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.
This change is from:
Author: Adrian Likins <email@example.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