[threeten-dev] It looks a bug for ChronoUnit.DAYS.addTo(LocalTime)

Stephen Colebourne scolebourne at joda.org
Fri May 10 04:19:33 PDT 2013


This used to make sense but doesn't really now
https://github.com/ThreeTen/threeten/issues/310
Stephen

On 10 May 2013 06:58, Patrick Zhang <patrick.zhang at oracle.com> wrote:
> Hi Team,
>
> See attached simple code, it does not throw exception but print strange
> output...
> ===========
> gtee at jsn-gtwy-1: ~ $ $JAVA_HOME/bin/java Test1
> true
> false
> true
> true
> 01:02:03.000000400
> 01:02:03.000000400
> ===========
>
> I do not think it is correct.
>
>    * DAYS.isSupportedBy(LocalTime) should return false since
>      DAYS.isTimeUnit() return false.
>
>    * DAYS.addTo(LocalTime) should throw exception nor returning one
>      unchanged value.
>
>
> Regards
> Patrick


More information about the threeten-dev mailing list