From owner-freebsd-java Tue Feb 12 15:14:29 2002 Delivered-To: freebsd-java@freebsd.org Received: from nova.fnal.gov (nova.fnal.gov [131.225.121.207]) by hub.freebsd.org (Postfix) with ESMTP id 230C637B41C for ; Tue, 12 Feb 2002 15:14:23 -0800 (PST) Received: from localhost (tez@localhost) by nova.fnal.gov (8.10.2+Sun/8.10.2) with ESMTP id g1CNEHw04672; Tue, 12 Feb 2002 17:14:17 -0600 (CST) X-Authentication-Warning: nova.fnal.gov: tez owned process doing -bs Date: Tue, 12 Feb 2002 17:14:17 -0600 (CST) From: Tim Zingelman X-X-Sender: tez@nova.fnal.gov To: Timothy Kettering Cc: FreeBSD-Java Subject: Re: Incorrect timestamps with native 1.3.1 jdk? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN 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 On Tue, 12 Feb 2002, Timothy Kettering wrote: > > 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 th= e > same time. > > 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 appe= ars > to be 12 hours ahead of the current time. Running the same application o= n > my OSX box returns the current time correctly. I.e. If it were 4PM now, = the > 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 any= thing > 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. > > I'm in CST (central standard time, GMT +600) if that helps. We currently use the linux-jdk, but we put: TZ=3DCST6CDT in the environment and that seems to make things work. - Tim To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message