Just for the record, Donald applied my patch on some branch on 2012/12/12
(commit fbeedcd3cea6c24fbbd1503b35a138b743959f12)

So, it seems my proposal was a good one :-)




On Wed, Dec 12, 2012 at 11:32 AM, Cyrille Bollu <cyrille.bo...@gmail.com>wrote:

> Hi list,
>
> I would like to re-surface the date format problem that's affecting
> jasperreports integration for at least 5 months.
>
> This problem is the cause of at least 3 opened issues:
>
> http://issues.opennms.org/browse/NMS-5404
> http://issues.opennms.org/browse/NMS-5379
> http://issues.opennms.org/browse/NMS-5457
>
> And makes the affected reports totally unusable for anyone not using
> english locales.
>
> After analysis, the problem seems to be that Java's SimpleDateFormat is
> locale dependent while Postgresql's isn't (see
> http://www.postgresql.org/docs/8.3/static/datetime-appendix.html. More
> precisely,
> http://www.postgresql.org/docs/8.3/static/datetime-keywords.html)
>
> So, in jasperreports' templates, all "EEE MMM d HH:mm:ss Z yyyy" date
> formats translate to something localized (eg: "Lun Juil 17 13:22:05 +002
> 2012") that postgresql doesn't understand (because "Lun" (Monday in French)
> and "Juil" (July in French) binary-search table lookups (see
> http://www.postgresql.org/docs/8.3/static/datetime-input-rules.html)
> don't succeed).
>
> In current openNMS source code, there are *14 such instances of this date
> format in only 32 jrxml files*!
>
> From what I've read, it seems that using "yyyy-MM-d HH:mm:ss Z" (ISO 8601)
> would be *much more appropriate*; From
> http://www.postgresql.org/docs/8.1/static/datatype-datetime.html :
>
> *"Date and time input is accepted in almost any reasonable format,
> including ISO 8601, SQL-compatible, traditional POSTGRES, and others"*
>
> and:
>
> *Table 8-10. Date Input*
> * ** *  *Example* *Description*   *January 8, 1999* *unambiguous in any
> datestyle input mode*  *1999-01-08* *ISO 8601; January 8 in any mode 
> (recommended
> format)*  *1/8/1999* *January 8 in MDY mode; August 1 in DMY mode*  *
> 1/18/1999* *January 18 in MDY mode; rejected in other modes*  *01/02/03* 
> *January
> 2, 2003 in MDY mode; February 1, 2003 in DMY mode; February 3, 2001 in YMDmode
> *  *1999-Jan-08* *January 8 in any mode*  *Jan-08-1999* *January 8 in any
> mode*  *08-Jan-1999* *January 8 in any mode*  *99-Jan-08* *January 8 in
> YMD mode, else error*  *08-Jan-99* *January 8, except error in YMD mode*
> *Jan-08-99* *January 8, except error in YMD mode*  *19990108* *ISO 8601;
> January 8, 1999 in any mode*  *990108* *ISO 8601; January 8, 1999 in any
> mode*  *1999.008* *year and day of year*  *J2451187* *Julian day*  *January
> 8, 99 BC* *year 99 before the Common Era*
> If you like, I've attached to this email a patch that fixes 10 of these
> date format instances (I'm not sure the 4 remaining instances need to be
> fixed).
>
> I hope my patch will agree you, and that you will find the time to commit
> it anytime soon.
>
> best regards,
>
> Cyrille
>
>
------------------------------------------------------------------------------
Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS
and more. Get SQL Server skills now (including 2012) with LearnDevNow -
200+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only - learn more at:
http://p.sf.net/sfu/learnmore_122512
_______________________________________________
Please read the OpenNMS Mailing List FAQ:
http://www.opennms.org/index.php/Mailing_List_FAQ

opennms-devel mailing list

To *unsubscribe* or change your subscription options, see the bottom of this 
page:
https://lists.sourceforge.net/lists/listinfo/opennms-devel

Reply via email to