From owner-freebsd-java Tue Feb 12 14:56:53 2002 Delivered-To: freebsd-java@freebsd.org Received: from corb.mc.mpls.visi.com (corb.mc.mpls.visi.com [208.42.156.1]) by hub.freebsd.org (Postfix) with ESMTP id 7E2B337B404 for ; Tue, 12 Feb 2002 14:56:49 -0800 (PST) Received: from [209.98.155.26] (envy.blackcore.com [209.98.155.26]) by corb.mc.mpls.visi.com (Postfix) with ESMTP id BCE7A8126 for ; Tue, 12 Feb 2002 16:56:48 -0600 (CST) User-Agent: Microsoft-Entourage/10.0.0.1331 Date: Tue, 12 Feb 2002 16:56:47 -0600 Subject: Incorrect timestamps with native 1.3.1 jdk? From: Timothy Kettering To: FreeBSD-Java Message-ID: In-Reply-To: <20020212155653.H68351-100000@puget.esil.univ-mrs.fr> Mime-version: 1.0 Content-type: text/plain; charset="ISO-8859-1" Content-transfer-encoding: quoted-printable Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org I searched the freebsd archives, and could only find one reference (from ma= y 2000) to a similar problem with jvm 1.2.2, and no solution was posted. I hate asking on listservs, but I'm stuck here and would like to fix this. I'm running 4.5 STABLE and using javavm 1.3.1 native (all installed via ports) The problem I have is that I'm getting timestamps that seem incorrect. I wrote a very simple test application that instances a current Date object, then spits out the timestamp in a long format. I compared that with the timestamp that's returned on my OSX development machine which I ran at the same time. =20 They're really different (more than just a few milliseconds difference). I did more investigation by formatting the date to a string using SimpleDateFormat and I'm seeing that the freebsd java implementation appear= s to be 12 hours ahead of the current time. Running the same application on my OSX box returns the current time correctly. I.e. If it were 4PM now, th= e java application on the freebsd box would say its 4AM the next day. I checked the server clock to be sure, and the server clock is set to the correct time and timezone. I checked the system properties, and the freebsd jvm doesn=B9t report anythin= g for the user.timezone. (returns an empty string), on my OSX machine, the same program returns an empty string as well. I checked that and other system properties which were returned, as part of a loop, so it can't because I coded it wrong or something. So, I guess what I'm asking is ideas or suggestions from more experienced java developers on where I should be looking to try to figure out this. I'= m thinking that mabye the freebsd jvm didn=B9t get the system values correctly, and if not, how do I set them? I'm in CST (central standard time, GMT +600) if that helps. Thanks in advance. --=20 Tim http://www.blackcore.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message