Hi,

In my app, Duration.toPeriod() returns Period object with month in it where
it should only contains hours. Here is the code segment:

       Duration dTemp = new Duration(today, bday);   //interval of today to
bday.

        Period pTemp = dTemp.toPeriod();                   //convert to
Period

        log("pTemp is: " + pTemp.toString());                //output is
"P9M2W3D"

        Days dsTemp = pTemp.toStandardDays();       //exception get thrown
here
My DateTimeUtils.getInstantChronology(null) method return

ISOChronology[Etc/GMT]

My colleague  had  ISOChronology[America/Los_Angeles] and he got period
contains only hours and below, once he switched his time zone to be same as
mine, he can reproduce the bug.

Right now I can get around this problem by using toPeriod(PeriodType.hours()),
but it will be nice to have this fixed.

Thanks!

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