Bug 472252

Summary: Monitoring Graphing Confuses 12 noon with Midnight In non-Latin Locales
Product: [Community] Spacewalk Reporter: Devan Goodwin <dgoodwin>
Component: WebUIAssignee: Devan Goodwin <dgoodwin>
Status: CLOSED CURRENTRELEASE QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: low Docs Contact:
Priority: medium    
Version: 0.3   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-01-22 16:30:41 UTC Type: ---
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: 456552    

Description Devan Goodwin 2008-11-19 16:20:45 UTC
Description of problem:

When attempting to graph from say 7am to 12pm in a non-Latin locale, Spacewalk will display an error claiming that the end time is before the start time.

Steps to Reproduce:
1. Enable monitoring on your spacewalk installation.
2. Add monitoring entitlement to a registered system.
3. Open the Monitoring tab in the SDC and create a probe for this system, preferably something that can be graphed such as load average.
4. Change your account locale preferences to German and timezone to something European, GMT+0100 should work.
5. Navigate back to the monitoring page, view the probe details, and select to graph from 07:00 to 12:00. (make sure to set the date to the same day)
  
Actual results:

Error message which, if translated, roughly states that the end date is before the start date.

Expected results:

This should work.

Additional info:

Problem is related to an ill-thought out hack in DatePicker.java where incoming hour of 12 is immediately changed to 0, and 0 is changed back to 12 outgoing, with no attention paid to whether or not the locale is even latin and if so, what the value of AM/PM is.

Comment 1 Devan Goodwin 2008-11-19 20:10:24 UTC
Can be reproduced just by setting language to German. Timezone is irrelevant.


Fixed in 01e85a3ec0a2640b646aed1533f083e30f4493e7. Added a check for isLatin() before doing the "hack".

Comment 2 Devan Goodwin 2009-01-14 21:19:24 UTC
Verified in spacewalk 0.4.