Red Hat Bugzilla – Bug 472252
Monitoring Graphing Confuses 12 noon with Midnight In non-Latin Locales
Last modified: 2009-01-22 11:30:41 EST
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)
Error message which, if translated, roughly states that the end date is before the start date.
This should work.
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.
Can be reproduced just by setting language to German. Timezone is irrelevant.
Fixed in 01e85a3ec0a2640b646aed1533f083e30f4493e7. Added a check for isLatin() before doing the "hack".
Verified in spacewalk 0.4.