Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 8E25B634195 for ; Mon, 31 Aug 2009 16:43:32 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 95509-05 for ; Mon, 31 Aug 2009 19:43:18 +0000 (UTC) X-Greylist: delayed 00:09:03.989019 by SQLgrey-1.7.6 Received: from shiva.plaintext.sk (unknown [81.0.124.6]) by mail.postgresql.org (Postfix) with ESMTP id 97F026337CC for ; Mon, 31 Aug 2009 16:43:21 -0300 (ADT) Received: from localhost (localhost.localdomain [127.0.0.1]) by shiva.plaintext.sk (Postfix) with ESMTP id 10AF8A029 for ; Mon, 31 Aug 2009 21:34:15 +0200 (CEST) X-Virus-Scanned: amavisd-new at plaintext.sk Received: from shiva.plaintext.sk ([127.0.0.1]) by localhost (shiva.plaintext.sk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5gKG6afshO1U for ; Mon, 31 Aug 2009 21:34:11 +0200 (CEST) Received: from blackhorse.local (unknown [192.168.36.180]) by shiva.plaintext.sk (Postfix) with ESMTP id 8E2F1A027 for ; Mon, 31 Aug 2009 21:34:10 +0200 (CEST) From: =?utf-8?q?=C4=BDubom=C3=ADr_Varga?= Reply-To: luvar@plaintext.sk Organization: LuVar To: pgsql-jdbc@postgresql.org Subject: Possible bug in PGInterval class Date: Mon, 31 Aug 2009 21:34:12 +0200 User-Agent: KMail/1.9.10 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200908312134.12661.luvar@plaintext.sk> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.64 tagged_above=-10 required=5 tests=BAYES_20=-0.74, RDNS_NONE=0.1 X-Spam-Level: X-Archive-Number: 200908/98 X-Sequence-Number: 19947 Hi. I have noticed imho bad behaviour of add methods for PGInterval class.=20 (org.postgresql.util.PGInterval) =46irst is unlogical adding sum to parameter and not to object on which is= =20 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=20 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= =20 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=20 behaviour. I am using 8.4-701 build and source... =2D-=20 Odborn=C3=ADk na v=C5=A1etko je zl=C3=BD odborn=C3=ADk. Ja sa sna=C5=BE=C3= =ADm by=C5=A5 v=C3=BDnimkou potvrdzuj=C3=BAcou=20 pravidlo.