Bug 825225

Summary: [RHSM GUI][as_IN] - Untranslated date string showing in "All available subscriptions" tab
Product: Red Hat Enterprise Linux 7 Reporter: Shwetha Kallesh <skallesh>
Component: subscription-managerAssignee: Adrian Likins <alikins>
Status: CLOSED CURRENTRELEASE QA Contact: Entitlement Bugs <entitlement-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0CC: alikins, bkearney, eng-i18n-bugs, eng-l10n-bugs, fsharath, jsefler, lijli, qe-i18n-bugs, smaitra
Target Milestone: rcKeywords: i18n, Translation
Target Release: 7.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-13 09:46:54 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 863175    
Attachments:
Description Flags
comparing localized date format
none
Date filter ISO format none

Description Shwetha Kallesh 2012-05-25 11:54:43 UTC
Description of problem:
unlocalised date string in all available subscriptions tab for as_IN

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

[root@skallesh pki]# rpm -qa | grep subscription-manager
subscription-manager-firstboot-0.99.19-1.git.0.99a87e8.el6.x86_64
subscription-manager-0.99.19-1.git.0.99a87e8.el6.x86_64
subscription-manager-migration-0.99.19-1.git.0.99a87e8.el6.x86_64
subscription-manager-gnome-0.99.19-1.git.0.99a87e8.el6.x86_64
subscription-manager-migration-data-1.12.1.8-1.git.0.c91a246.el6.noarch

How reproducible:


Steps to Reproduce:
1.LANG=as_IN.UTF-8 subscription-manager-gui
2.Click on all available subscriptions tab
3.
  
Actual results:
In the attachment

Expected results:

Date to be localised 
Additional info:

Comment 2 Adrian Likins 2012-05-25 14:01:07 UTC
I don't see an attachment?

What should the date format for as_IN look like?

I'm seeing:

25-05-2012

which seems to match:

> LANG=as_IN.UTF-8 date +%x
25-05-2012

and:

> LANG=as_IN.UTF-8 python -c "import datetime; import locale; locale.setlocale(locale.LC_ALL, ''); print locale.getlocale(locale.LC_TIME); print datetime.datetime.today().strftime('%x')"
('as_IN', 'UTF-8')
25-05-2012

NOTE: this is supposed to be the locale specific numerical date format (as opposed to say, '%c' date sub section, like "25 মে, 2012"

This seems to be working correctly to me unless the reporter is seeing different output.

Comment 4 John Sefler 2013-01-29 20:12:33 UTC
Created attachment 690026 [details]
comparing localized date format

[root@rhsm-accept-rhel6 ~]# rpm -q subscription-manager-gui
subscription-manager-gui-1.1.23-1.el6.x86_64

[root@rhsm-accept-rhel6 ~]# LANG=as_IN.UTF-8 date +%x
29-01-2013
[root@rhsm-accept-rhel6 ~]# LANG=as_IN.UTF-8 subscription-manager-gui

Adrian,
Look at the attached screenshot.  Notice that the date format for LANG=as_IN.UTF-8 is not exactly the same between the cli and the gui.  I think these should be the exact same format.  NEEDINFO

Comment 7 Adrian Likins 2014-01-31 15:44:23 UTC
(In reply to John Sefler from comment #4)
> Created attachment 690026 [details]
> comparing localized date format
> 
> [root@rhsm-accept-rhel6 ~]# rpm -q subscription-manager-gui
> subscription-manager-gui-1.1.23-1.el6.x86_64
> 
> [root@rhsm-accept-rhel6 ~]# LANG=as_IN.UTF-8 date +%x
> 29-01-2013
> [root@rhsm-accept-rhel6 ~]# LANG=as_IN.UTF-8 subscription-manager-gui
> 
> Adrian,
> Look at the attached screenshot.  Notice that the date format for
> LANG=as_IN.UTF-8 is not exactly the same between the cli and the gui.  I
> think these should be the exact same format.  NEEDINFO

Ah! In the date filter. Yeah, that one is going to be in ISO date format, not the localized date format. 

It uses the ISO for user input strings because of:
https://bugzilla.redhat.com/show_bug.cgi?id=744136
https://bugzilla.redhat.com/show_bug.cgi?id=704069

(The localized date parsing strptime() is broken for some locales, even for formats that strftime() output. For added fun, some of the locales only break after September [single digit month to two digit months]. So the date format there was switched to the iso format that can be parsed).

If the date parsing ever gets fixed, we can move back to localized dates, but for now the iso date format there is correct.

Comment 9 Sharath Dwaral 2014-02-04 21:30:55 UTC
Created attachment 859390 [details]
Date filter ISO format

Version:

# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 0.9.2-1
subscription-manager: 1.10.13-1.el7
python-rhsm: 1.10.12-1.el7

Verification:

Please see attachment

As per comment 7 the date format will be ISO format for a few locales.


VERIFIED

Comment 10 Ludek Smid 2014-06-13 09:46:54 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.