Possible bug in PGInterval class - Mailing list pgsql-jdbc

From Ľubomír Varga
Subject Possible bug in PGInterval class
Date
Msg-id 200908312134.12661.luvar@plaintext.sk
Whole thread Raw
Responses Re: Possible bug in PGInterval class  (Kris Jurka <books@ejurka.com>)
List pgsql-jdbc
Hi.

I have noticed imho bad behaviour of add methods for PGInterval class.
(org.postgresql.util.PGInterval)

First is unlogical adding sum to parameter and not to object on which is
method invoked. (this is also writen in javadoc, so I accept it)

Second, critical for me, is to not using modulo in addition. So if you add 55
minutes to 55 minutes, you get 110 minutes instead of 1 hour and 50 minutes.

Is this bug or feature? Should I use to postprocessing of sql query result
some other date classes? (joda time, or java date class...)

Thanks for answer.

PS: If it is not bug, please add some description to javadoc also to this
behaviour.

I am using 8.4-701 build and source...

--
Odborník na všetko je zlý odborník. Ja sa snažím byť výnimkou potvrdzujúcou
pravidlo.

pgsql-jdbc by date:

Previous
From: Thomas Kellerer
Date:
Subject: Re: Search content within a bytea field
Next
From: Kris Jurka
Date:
Subject: Re: Possible bug in PGInterval class