Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 36261 invoked from network); 3 Mar 2008 16:58:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Mar 2008 16:58:24 -0000 Received: (qmail 27935 invoked by uid 500); 3 Mar 2008 16:58:19 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 27483 invoked by uid 500); 3 Mar 2008 16:58:18 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Received: (qmail 27472 invoked by uid 99); 3 Mar 2008 16:58:18 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Mar 2008 08:58:18 -0800 X-ASF-Spam-Status: No, hits=1.4 required=10.0 tests=SPF_NEUTRAL,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [216.247.37.33] (HELO mail16.atl.registeredsite.com) (216.247.37.33) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Mar 2008 16:57:29 +0000 Received: from mail2.referentia.com (mail2.referentia.com [216.122.129.145]) by mail16.atl.registeredsite.com (8.12.11.20060308/8.12.11) with ESMTP id m23GvmID000662 for ; Mon, 3 Mar 2008 11:57:48 -0500 Received: from EETHKOTH (corp1.referentia.com [64.128.15.194]) by mail2.referentia.com (8.11.6/8.11.0) with ESMTP id m23Gvmp66599 for ; Mon, 3 Mar 2008 06:57:48 -1000 (HST) (envelope-from jnewsham@referentia.com) From: "Jim Newsham" To: "'Derby Discussion'" References: <15796254.post@talk.nabble.com> <47CB63D1.7060107@sun.com> <15802314.post@talk.nabble.com> Subject: RE: CURRENT_TIME function Date: Mon, 3 Mar 2008 06:57:39 -1000 Message-ID: <03f901c87d4f$b3ba5280$8700a8c0@referentia.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 In-Reply-To: <15802314.post@talk.nabble.com> Thread-Index: Ach9LHva7y2I2iD2SziMQ3aVj0nCGAAIur6A X-Virus-Checked: Checked by ClamAV on apache.org For your scenario, use System.nanoTime() instead. This provides a time value (in nanoseconds, so you'll have to scale it appropriately) which is not tied to the system clock. It is only appropriate for calculating elapsed time (not time relative to a fixed clock such as "wall time"), but this is fine for your purposes. Jim > -----Original Message----- > From: musky [mailto:muskvar@gmail.com] > Sent: Monday, March 03, 2008 2:45 AM > To: derby-user@db.apache.org > Subject: Re: CURRENT_TIME function > > > the scenario is an automated exam where the questions are fetched from the > apache derby database server. > > so i wanted to fetch the time also from the server so that the local > client > local clock tampering will have no effect on the current time. > > how do i do this. > > regards. > > please help. > > Narayanan-4 wrote: > > > > Hi, > > > > You might want to refer the CURRENT_TIME function here > > > > http://db.apache.org/derby/docs/dev/ref/rrefsqlj33772.html#rrefsqlj33772 > > > > a reply to a previous datetime arithmetic question here > > > > http://mail-archives.apache.org/mod_mbox/db-derby- > user/200501.mbox/%3c41D92C14.5030204@gematronik.com%3e > > > > Pls note the following line in the derby reference manual in relation to > > that function > > > > "the value returned does not change if it is executed more than once in > > a single statement" > > > > Also just being curious, why can't you just display the time using logic > > in the java program itself? > > > > Would it be OK for you to please mention the scenario in which you > > would want to do this? > > > > Narayanan > > > > musky wrote: > >> i want to retrieve the current time from derby every second and display > >> it in > >> my java program using a daemon thread that is scheduled to run every > >> second.how do i go about doing this. > >> > >> please help. > >> regards. > >> > > > > > > > > -- > View this message in context: http://www.nabble.com/CURRENT_TIME-function- > tp15796254p15802314.html > Sent from the Apache Derby Users mailing list archive at Nabble.com. >