From owner-freebsd-java Tue Mar 12 22:32: 8 2002 Delivered-To: freebsd-java@freebsd.org Received: from chen.org.nz (adsl-210.54.19.51.quicksilver.net.nz [210.54.19.51]) by hub.freebsd.org (Postfix) with ESMTP id A58FA37B416 for ; Tue, 12 Mar 2002 22:31:46 -0800 (PST) Received: (from jonc@localhost) by chen.org.nz (8.11.6/8.11.6) id g2D6UWi64990; Wed, 13 Mar 2002 19:30:32 +1300 (NZDT) (envelope-from jonc) Date: Wed, 13 Mar 2002 19:30:31 +1300 From: Jonathan Chen To: Timothy Kettering Cc: FreeBSD-Java Subject: Re: Setting the JVM timezone Message-ID: <20020313193031.A44414@grimoire.chen.org.nz> References: <3C8EA1E0.1020003@usa.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: ; from timster@blackcore.com on Tue, Mar 12, 2002 at 09:12:26PM -0600 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, Mar 12, 2002 at 09:12:26PM -0600, Timothy Kettering wrote: [...] > 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 That's 'cos the TZ entry refers to zone files relative to /usr/share/zoneinfo. If it can't find the zone-file, it will default to GMT. If you try something like "export TZ=America/Denver", I suspect your results will be more correct. -- Jonathan Chen ---------------------------------------------------------------------- "I don't want to achive immortality through my works.. I want to achieve it through not dying" - Woody Allen To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message