Jason Henriksen wrote:
> 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.  

There is no way to prevent the output of seconds in the time zone in 
Joda-Time.

The best you can do is to create an implementation of DateTimePrinter 
that formats just the HH:MM zone format you want. You then build up a 
DateTimeFormatter using DateTimeFormatterBuilder. Finally, you pass the 
formatter into the toString method.

Alternately, you could alter the time zone to round it to the nearest hour.

Stephen

-------------------------------------------------------------------------
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