Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 9941B6500EE for ; Wed, 9 Jul 2008 02:26:07 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 90079-06 for ; Wed, 9 Jul 2008 02:26:03 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from www01.kensystem.com (www01.kensystem.com [72.19.170.120]) by postgresql.org (Postfix) with ESMTP id C6C1D6500B8 for ; Wed, 9 Jul 2008 02:26:03 -0300 (ADT) Received: from 192.168.0.3 by www01.kensystem.com (SMTPD); id s20080709052552.248796; Wed, 09 Jul 2008 05:25:52 Message-ID: <48744BE0.1010304@kensystem.com> Date: Tue, 08 Jul 2008 23:25:52 -0600 From: Ken Johanson User-Agent: Thunderbird 1.5.0.14 (Windows/20071210) MIME-Version: 1.0 To: Oliver Jowett CC: pgsql-jdbc@postgresql.org Subject: Re: Timestamp without Timezone and differing client / server tzs References: <4873154E.6020808@kensystem.com> <4873201F.1000700@opencloud.com> <487439D8.2050508@kensystem.com> <48743B53.4000002@opencloud.com> <48743F0C.6020504@kensystem.com> <4874419A.6030705@opencloud.com> In-Reply-To: <4874419A.6030705@opencloud.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200807/20 X-Sequence-Number: 18805 Oliver Jowett wrote: >>> Ken Johanson wrote: >> This is useful where plural databases (not under my control) may exist >> each in different timezones, and the app must deal with each >> concurrently; where storing server configs (separate from the URL) and >> passing Calendar objects for each, could be avoided. > > But if you are using timestamp-without-timezone in each database, I > don't understand why the server timezone comes into the equation at all? The servers and their schema (use-of ts w/o tz are not under my control; adding with-timezone would likely break apps that transmit date values with offset already normalized). > > Can you give me some concrete examples of schema + app code and how you > would want it to behave? > Just to pass-in a timestamp, and which ever database it is sent to, be stored with its real atomic (integer) value (ie string conversion normalized to what db uses). Simplified: Timestamp NOW = new Timestamp(System.currentTimeMillis()); for (int i=0; i