On 19 February 2010 19:20, DJ Gregor <d...@opennms.org> wrote:
> The event in question came in from localhost via send-event.pl through
> eventd's TCP event receiver:
>
<snip>
>
> It looks like send-event.pl might not encode the date right as you point
> out:
<snip>
> Please open a bug and we'll take a look at it.  I wonder if the problem
> might be that the time is encoded as "5:14:53 PM" instead of "17:14:53".

I've opened bug 3576 with a patch to correct the formatting of the
DateTime used by the script:

http://bugzilla.opennms.org/show_bug.cgi?id=3576

> Regarding this question:
>
>>  * Question: Is there any particular reason the Date is stored this
>>  way internally?
>
> In this case, the date is coming in via XML, so we have to convert what
> comes in via XML into Java objects, and this is where the exception is
> happening in your case.

Is there anyway to add any validation to the Castor created Event
class? It would be nicer if the Event.setTime() method threw the
exception when the badly formatted data came in rather than when it
was used.

Of course this would probably involve parsing the date which leads to
the question of why the Castor object has to store time as a string?
It's not as though XML can't feed in an unambiguously specified time
spec:

http://www.w3schools.com/Schema/schema_dtypes_date.asp

-- 
Alex, homepage: http://www.bennee.com/~alex/
http://www.half-llama.co.uk

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
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