From owner-freebsd-java Thu Jul 5 14:54:29 2001 Delivered-To: freebsd-java@freebsd.org Received: from adsl-151-197-8-33.phila.adsl.bellatlantic.net (adsl-151-197-8-33.phila.adsl.bellatlantic.net [151.197.8.33]) by hub.freebsd.org (Postfix) with ESMTP id E1FC637B406 for ; Thu, 5 Jul 2001 14:54:25 -0700 (PDT) (envelope-from bleez@bellatlantic.net) Received: from gravy (y4712u@gravy [192.168.1.1]) by adsl-151-197-8-33.phila.adsl.bellatlantic.net (8.11.4/8.11.4) with ESMTP id f65LsOl07893; Thu, 5 Jul 2001 17:54:24 -0400 (EDT) (envelope-from bleez@bellatlantic.net) Date: Thu, 5 Jul 2001 17:54:23 -0400 (EDT) From: Bryan Liesner X-X-Sender: To: Christopher Rued Cc: Subject: Re: time screwed up with Linux-jdk1.3.1? In-Reply-To: <15172.47846.161794.35615@chris.xsb.com.> Message-ID: <20010705172636.T7698-100000@adsl-151-197-8-33.phila.adsl.bellatlantic.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 Thu, 5 Jul 2001, Christopher Rued wrote: >Has anyone heard anything about the clock being screwed up under linux >emulation, or in the linux-jdk1.3.1? > >If I run this code: > >public class TestTime { > public static void main(String args[]) > { > System.out.println("The current time is: " > + new java.util.Date(System.currentTimeMillis())); > } >} I did something similar in a servlet: SimpleDateFormat sdFormat = new SimpleDateFormat("EEEE MMMM d, yyyy HH:mm:ss z"); String dateAndTime = sdFormat.format(new Date()); When Tomcat was running under linux-jdk1.3.1 it screwed up the time. It also returned GMT-5:00 with the actual time short by an hour. Under the FreeBSD native jdk1.2.2, the time was returned with EDT and the correct time. I haven't really looked into why. I usually use the native jdk, and I was just playing around with the Linux jdk. ========================================================== = Bryan D. Liesner LeezSoft Communications, Inc. = = A subsidiary of LeezSoft Inc. = = bleez@bellatlantic.net Home of the Gipper = ========================================================== To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message