From owner-freebsd-java Tue Mar 12 19:52: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 90DD037B400 for ; Tue, 12 Mar 2002 19:52:25 -0800 (PST) Received: from localhost (tez@localhost) by nova.fnal.gov (8.10.2+Sun/8.10.2) with ESMTP id g2D3qOn01447 for ; Tue, 12 Mar 2002 21:52:24 -0600 (CST) X-Authentication-Warning: nova.fnal.gov: tez owned process doing -bs Date: Tue, 12 Mar 2002 21:52:23 -0600 (CST) From: Tim Zingelman X-X-Sender: tez@nova.fnal.gov Reply-To: FreeBSD-Java To: FreeBSD-Java Subject: Re: Setting the JVM timezone In-Reply-To: Message-ID: 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 Tue, 12 Mar 2002, Timothy Kettering wrote: > > > > With the compiled native JDK 1.3.1, > > I got: > > java TestRun > > The TZ is: CET > > (correct) > > > > With the Linux jdk1.3.1: > > java TestRun > > The TZ is: EST > > (wrong) > > but after > > > > $ export TZ=CET > > > > I got the right result: > > java TestRun > > The TZ is: CET > > Regards, > > > > Jorge > > > > Ok I tried the same stuff you did, and I seem to have gotten completely > opposite results. Here's a paste. But it seems that at first the linux JDK > got the timezone right, but then after exporting the TZ, both JDKs return > GMT?? > > $ /usr/local/linux-jdk1.3.1/bin/java TestRun > The TZ is: GMT-06:00 > $ /usr/local/jdk1.3.1/bin/java TestRun > The TZ is: GMT+06:00 > $ export TZ=CST > $ /usr/local/linux-jdk1.3.1/bin/java TestRun > The TZ is: GMT+00:00 > $ /usr/local/jdk1.3.1/bin/java TestRun > The TZ is: GMT+00:00 What we use, and works for us with both the linux 1.3.0 jdk on intel (on FreeBSD) and the solaris 1.3.0 jdk on sparc is "export TZ=CST6CDT". solaris8$ java -version java version "1.3.0_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0_01) Java HotSpot(TM) Client VM (build 1.3.0_01, mixed mode) solaris8$ export TZ=CST6CDT solaris8$ java TestRun The TZ is: CST solaris8$ unset TZ solaris8$ java TestRun The TZ is: GMT-06:00 FreeBSD$ java -version java version "1.3.0" Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0) Classic VM (build 1.3.0, green threads, nojit) FreeBSD$ export TZ=CST6CDT FreeBSD$ java TestRun The TZ is: CST FreeBSD$ unset TZ FreeBSD$ java TestRun The TZ is: GMT-06:00 Seem's pretty consistent. Sorry I don't have any other versions of the jdk handy to test with. - Tim To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message