Created attachment 491149 [details] This is a Customer Portal view in which we can see the correct end date. Date format is MM/DD/YYYY. Description of problem: Subscription end date in the Subscription Manager is incorrect. How reproducible: Steps to Reproduce: 1. Open subscription manager 2. Register a system 3. Assign a subscription to the system 4. Click on My Subscriptions 5. Under the subscription details, we can see the wrong end date. Also we can see the wrong date on the top left corner ¨Product entitlement valid through...¨. Expected results: The same end date that can be seen on the customer portal will be displayed. Additional info: Pls see the screenshots. customerportal.png: correct end date displayed. SubM.png: wrong end date displayed here.
Created attachment 491150 [details] wrong end date displayed on the top left corner (4 Jan 2012) and in the middle (3 Jan 2012).
Comment on attachment 491149 [details] This is a Customer Portal view in which we can see the correct end date. Date format is MM/DD/YYYY. This is a correct end date that we can confirm on the Customer Portal page. Date format is mm/dd/yyyy.
Hi John, Yes the date format is different between the customer portal and the subscription manager but what you said is correct (If this is the case, then the end dates differ by 1 day.). Please also check the top left corner, this expiration date is added one more day. Cheers, Kenji
I have not yet had the opportunity to reproduce this error, but I must agree that there is a problem somewhere in the localization of the enddate. From my understanding of the screenshots: 1. web client tools is reporting a subscription enddate of Jan 02, 2012 2. subscription-manager-gui is reporting in the subscription details an enddate of Jan 03, 2012 3. subscription-manager-gui is reporting in the certificate status that the certificates are valid through (which to me means including) Jan 04, 2012 4. what is reported by subscription-manager list --consumed ? There is a discrepancy of 2 days between the web client tool and subscription-manager-gui
Created attachment 491560 [details] four day discrepancy in end dates - got to see it to believe it! Attached is a screenshot that shows four different end dates that supposedly represent the same date. 1. subscription-manager list --consumed 2. subscription-manager-gui My Installed Software 3. subscription-manager-gui Certificate Status 4. web client Subscriptions 5. subscription-manager-gui My Subscriptions (NOT SHOWN, BUT DISPLAYS enddate of 04/11/2012) Version Tested: (Note this is rhel6, but also applies to rhel5.7) [root@jsefler-betastage-server tmp]# rpm -qa | grep subscription-manager subscription-manager-0.95.7-1.git.12.3b9a09e.el6.x86_64 subscription-manager-firstboot-0.95.7-1.git.12.3b9a09e.el6.x86_64 subscription-manager-gnome-0.95.7-1.git.12.3b9a09e.el6.x86_64 [root@jsefler-betastage-server entitlement]# date Tue Apr 12 15:08:32 EDT 2011 [root@jsefler-betastage-server entitlement]# openssl x509 -text -in 2973020770543838983.pem | grep 1.3.6.1.4.1.2312.9.4.7 -B2 -A1 1.3.6.1.4.1.2312.9.4.6: ..2011-04-12T04:00:00Z 1.3.6.1.4.1.2312.9.4.7: ..2012-04-12T03:59:59Z ^^^^ Note from the entitlement cert, this entitlement is technically valid until the last tick of the day on April 11, 2012 in my timezone EDT. Therefore, looking at the screenshot, the command line tool list --consumed and subscription-manager-gui My Subscriptions are the winners! The others are wrong. Additional Info... Here's a look at the subscription pool: # curl -u stage_test_12:redhat -k http://rubyvip.web.stage.ext.phx2.redhat.com:80/clonepin/candlepin/owners/6306607/pools | python -mjson.tool | grep 2280386 -A26 -B27 { "accountNumber": "1444063", "activeSubscription": true, "attributes": [ { "created": "2011-04-12T15:59:50.000+0000", "id": "8a99f9812f270524012f4a70b1021b7e", "name": "requires_consumer_type", "updated": "2011-04-12T15:59:50.000+0000", "value": "system" }, { "created": "2011-04-12T15:59:50.000+0000", "id": "8a99f9812f270524012f4a70b1021b7f", "name": "virt_limit", "updated": "2011-04-12T15:59:50.000+0000", "value": "0" }, { "created": "2011-04-12T15:59:50.000+0000", "id": "8a99f9812f270524012f4a70b1021b80", "name": "virt_only", "updated": "2011-04-12T15:59:50.000+0000", "value": "true" } ], "consumed": 0, "contractNumber": "2280386", "created": "2011-04-12T15:59:50.000+0000", "endDate": "2012-04-12T03:59:59.000+0000", "href": "/pools/8a99f9812f270524012f4a70b1021b7d", "id": "8a99f9812f270524012f4a70b1021b7d", "owner": { "href": "/owners/6306607", "id": "8a99f9812f270524012f3694dc59509e" }, "productId": "RH0103708", "productName": "Red Hat Enterprise Linux Server, Premium (8 sockets) (Up to 4 guests)", "providedProducts": [ { "created": "2011-04-12T15:59:50.000+0000", "id": "8a99f9812f270524012f4a70b1021b81", "productId": "69", "productName": "Red Hat Enterprise Linux 6 Server", "updated": "2011-04-12T15:59:50.000+0000" } ], "quantity": 400, "restrictedToUsername": null, "sourceEntitlement": null, "startDate": "2011-04-12T04:00:00.000+0000", "subscriptionId": "2077747", "updated": "2011-04-12T15:59:50.000+0000" } ^^^ as expected, its enddate matches the entitlement enddate of 2012-04-12T03:59:59.000+0000 which is correct
Created attachment 491562 [details] Software entitlements valid through <date> Also relevant to this bug are the dates on the Subscription Assistant dialog. I suspect the fix to correct the date rendered in the "Software entitlements valid through <date>" string displayed in the Certificate Status panel AND the Subscription Assistant is to localize the date from GMT to the local timezone.
I'm adding Grant Gainey (developer of the web client tooling for subscriptions) as a cc on this bug list since attachment 491560 [details] shows that the end date displayed in the web client does not appear to be localized from GMT to the local timezone as detailed in comment 10.
commit 73eda9ccf29a4bffba0c146250bb1046792c58cd Author: Adrian Likins <alikins> Date: Mon Apr 18 14:16:43 2011 -0400 695234: dates are being displayed incorrectly everywhere installed tab was storing a formatted date string, which was getting coverted to a datetime, losing it's timezone, and was then getting displayed incorrectly. Change all of our TreeStores to store datetime objects for dates instead of formatted strings, and make CellRendererDate do the formatting. Add parseDate to managerlib and make formatDate just format. parseDate expects an iso8601 style date and returns a datetime, while formatDate expects a datetime and returns a formatted string. Move LocalTz tzinfo subclass here from gui/utils. Note: for installedtab, we also changed the start/end dates displayed from being the _order_ start and end dates, to being the stand/end dates for the certificate. Try to be a little more consistent in our usage of formatDate vs strftime (this should fix up the client side stuff)
Created attachment 500169 [details] circled end dates in green are now formatted in the client system's local time zone Verifying Version... [root@jsefler-RHEL57ServerBeta12 product]# rpm -qa | grep subscription-manager subscription-manager-firstboot-0.95.5.18-1.el5 subscription-manager-0.95.5.18-1.el5 subscription-manager-gnome-0.95.5.18-1.el5 Viewing the attached screenshot for rhel57, you will see that the end dates for a subscription between subscription-manager-gui and subscription-manager cli circled in green now match and represent the UTC end date formatted into the local time zone (EDT) of the client system. The Product Entitlement certificate end date circled in red is being tracked in a separate bug #703286 The end date in the rhsm web application is also being tracked in a separate bug #703303
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHEA-2011-1078.html