I'm hoping there's an easy fix for this that you guys can offer.

If I do something like

DatatypeFactory.newInstance().newXMLGregorianCalendar(  (new
DateMidnight()).toString()  );

I get an exception.  (I'm actually getting the DateMidnight from another
source, but the point is that XMLGregorianCalender dies.)

It dies because the string format looks like this:
0001-01-13T00:00:00.000-07:52:58

It's the extra ":58" at the end that causes all the difficulty.  If I use
some string manipulation to remove the ":58" then everything is fine and I
can convert the objects without any trouble.  Unfortunately that string
manipulation has to go everywhere that I need to do the conversion and
that's becoming a lot of places.

Is there any way to configure DateTime and DateMidnight to not worry about
the time zone offset seconds?  I'd really appreciate some way of configuring
it once and having it effect the entire JVM.

If there's no easy way to configure this behavior how would you suggest I go
about creating a DateTimeExtended such that I could control how that works?
Or am I best off to create my own extension classes use them exclusively and
alter the toString method to call the parent and then do string hacks?

Thanks much,

               Jason Henriksen
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Joda-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/joda-interest

Reply via email to