Return-Path: Delivered-To: apmail-db-jdo-dev-archive@www.apache.org Received: (qmail 52421 invoked from network); 9 Feb 2007 08:49:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Feb 2007 08:49:00 -0000 Received: (qmail 77758 invoked by uid 500); 9 Feb 2007 08:49:07 -0000 Mailing-List: contact jdo-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jdo-dev@db.apache.org Delivered-To: mailing list jdo-dev@db.apache.org Received: (qmail 77747 invoked by uid 99); 9 Feb 2007 08:49:07 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Feb 2007 00:49:07 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (herse.apache.org: local policy) Received: from [216.148.213.132] (HELO smtp.mailix.net) (216.148.213.132) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Feb 2007 00:48:57 -0800 Received: from [192.168.8.8] (helo=localhost) by smtp.mailix.net with asmtp (Exim 4.24-H) id 1HFRQv-0003I1-NB for jdo-dev@db.apache.org; Fri, 09 Feb 2007 00:48:41 -0800 Received: from 12.130.3.100 ([12.130.3.100]) by webmail.jpox.org (IMP) with HTTP for ; Fri, 9 Feb 2007 00:48:32 -0800 Message-ID: <1171010912.45cc356020125@webmail.jpox.org> Date: Fri, 9 Feb 2007 00:48:32 -0800 From: Erik Bengtson To: jdo-dev@db.apache.org References: <9780ADC2-5FEC-4A35-92BE-1C34A26618F9@SUN.com> In-Reply-To: <9780ADC2-5FEC-4A35-92BE-1C34A26618F9@SUN.com> MIME-Version: 1.0 User-Agent: Internet Messaging Program (IMP) 3.2.3 X-Originating-IP: 12.130.3.100 X-SA-Exim-Mail-From: erik@jpox.org Subject: Re: [DISCUSS} Server TimeZone Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-SA-Exim-Version: 3.1 (built Thu Oct 23 13:26:47 PDT 2003) X-SA-Exim-Scanned: No; Unknown failure X-uvscan-result: clean (1HFRQv-0003I1-NB) X-Virus-Checked: Checked by ClamAV on apache.org Craig, I understand that server means the backend database server. what it we have multiple backend db servers? Use case with multiple dbs: SELECT FROM db1.classA WHERE classA.time > datetime() && classB.time > datetime() VARIABLES db2.classB The first datetime() is evaluated by db1, while the second by db2. Quoting Craig L Russell : > Here is a proposal to add the ability of a user to get the time at > the server in a portable way. > > This should allow an application to avoid time skew by using the time > as seen by a single source, the server to which the > PersistenceManagerFactory is connected. > > > 11.1 > ... > ServerTimeZoneID: the time zone ID of the server to which this > PersistenceManagerFactory is connected, for use with the > PersistenceManager method getServerDate > If ServerTimeZoneID is specified, the value must correspond to a > valid time zone ID as returned by TimeZone.getAvailableIDs(). The > implementation uses the ServerTimeZoneID to implement the > getServerDate method. If ServerTimeZoneID is not specified, the > implementation might use proprietary methods to determine the time > zone in which the server is located. If ServerTimeZoneID is not > specified, and the implementation cannot or does not use proprietary > methods to determine the server time zone, then the default time zone > ID of the Java VM is used. > > 12.17 Server Date > java.util.Date getServerDate(); > > Time skew is a phenomenon in which machines connected together in > client/server configurations might have clocks that are not perfectly > synchronized, and the time as seen by different clients might differ. > In order for the application to avoid time skew, this method can be > used to acquire a Date instance corresponding to the UTC Date as seen > by the server. Clients using this method can order their operations > according to a single time source. > Implementations use the setting of the server time zone to prepare a > Date instance that represents UTC time on the server. > > > Craig Russell > Architect, Sun Java Enterprise System http://java.sun.com/products/jdo > 408 276-5638 mailto:Craig.Russell@sun.com > P.S. A good JDO? O, Gasp! > >