Folks,

Take this simple unit test:

DateTimeFormatter parser = ISODateTimeFormat.dateTimeParser();
DateTime time1 = new DateTime(2007,11,22,7,0,42,0,DateTimeZone.UTC);
DateTime time2 = parser.parseDateTime("2007-11-22T07:00:42Z");                  
assertEquals(time1, time2);


This fails, apparently because each DateTime instance contains a 
different instance of ISOChronology.  time1 contains the static 
DateTimeZone.UTC instance, and the parsed time2 contains an instance 
manually assembled by the parser.  Now, ISOChronology has no equals() 
method defined, nor do any of its superclasses, and so the equals 
comparison fails.

Given that the "Z" offset is defined as UTC, I would have expected this 
test to pass.

Am I missing something, or this is a bug/flaw?


cheers
kenny

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
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