Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id D3BDF1337BB7 for ; Thu, 7 Apr 2011 04:06:41 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 45583-01 for ; Thu, 7 Apr 2011 07:06:32 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from smadev.internal.net (host3.dynacom.ondsl.gr [62.103.35.211]) by mail.postgresql.org (Postfix) with ESMTP id D30D31337B47 for ; Thu, 7 Apr 2011 04:06:30 -0300 (ADT) Received: from smadev.internal.net (localhost.internal.net [127.0.0.1]) by smadev.internal.net (8.14.2/8.14.2) with ESMTP id p3776SYx090777 for ; Thu, 7 Apr 2011 10:06:28 +0300 (EEST) (envelope-from achill@matrix.gatewaynet.com) Received: from localhost (localhost [[UNIX: localhost]]) by smadev.internal.net (8.14.2/8.14.2/Submit) id p3776S8w090776 for pgsql-jdbc@postgresql.org; Thu, 7 Apr 2011 10:06:28 +0300 (EEST) (envelope-from achill@matrix.gatewaynet.com) From: Achilleas Mantzios Organization: Dynacom Tankers Mgmt To: pgsql-jdbc@postgresql.org Subject: Re: time and timetz : Do I miss something? Date: Thu, 7 Apr 2011 09:06:26 +0200 User-Agent: KMail/1.9.7 References: <201104051804.18535.achill@matrix.gatewaynet.com> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <201104071006.27718.achill@matrix.gatewaynet.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201104/46 X-Sequence-Number: 21772 =CE=A3=CF=84=CE=B9=CF=82 Wednesday 06 April 2011 01:38:53 =CE=BF/=CE=B7 Oli= ver Jowett =CE=AD=CE=B3=CF=81=CE=B1=CF=88=CE=B5: > On 6 April 2011 03:04, Achilleas Mantzios = wrote: >=20 > > IMO, the values it gets for the atimestamp =A0(without tz) and atimesta= mptz (with tz) are sane. > > I dont supply any Calendar in getTimestamp for the "without tz" timesta= mp so the driver correctly assumes > > we are talking about the local Greek time zone. Correctly 2011-04-05 00= :00:00.0 +0300=3D2011-04-04 21:00:00.0 +0000 > > However i dont quite get the results for atime (without tz) and atimetz= (with tz): > > For atime it correctly prints the time 00:00:00, but the millis should = be -10800000, and in hours should be -3.0. > > For atimetz it incorrectly prints "23:00:00" , but correctly states tha= t the millis=3D-10800000, and in hours -3.0. > > Shouldn't at least timetz print the same time as in the case with the t= imestamptz? >=20 > What were the Greek timezone rules on Jan 1 1970? > Because that's what it'll be applying (time objects are really just > Date objects based around Jan 1 1970 - it doesn't work very well as > you discovered, but blame JDBC for that one..) >=20 > From your results I expect that it was +0200 on Jan 1 1970; > therefore "00:00:00" =3D=3D Jan 1, 1970, 00:00:00 locally =3D=3D Dec 31, = 1969, > 22:00 GMT =3D=3D -2 hours from the epoch (your 'atime' result) > and "00:00:00+03" =3D=3D Jan 1, 1970, 00:00:00 +0300 =3D=3D Dec 31, 1969, > 23:00 locally =3D=3D Dec 31, 1969, 21:00 GMT =3D=3D -3 hours from the epo= ch > (your 'atimetz' result) >=20 > Oliver >=20 It seems so Oliver, thanx. =2D-=20 Achilleas Mantzios