Date: Thu, 5 Jul 2001 17:54:23 -0400 (EDT) From: Bryan Liesner <bleez@bellatlantic.net> To: Christopher Rued <c.rued@xsb.com> Cc: <freebsd-java@FreeBSD.ORG> Subject: Re: time screwed up with Linux-jdk1.3.1? Message-ID: <20010705172636.T7698-100000@adsl-151-197-8-33.phila.adsl.bellatlantic.net> In-Reply-To: <15172.47846.161794.35615@chris.xsb.com.>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010705172636.T7698-100000>
