Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Mar 2002 21:52:23 -0600 (CST)
From:      Tim Zingelman <zingelman@fnal.gov>
To:        FreeBSD-Java <java@FreeBSD.ORG>
Subject:   Re: Setting the JVM timezone
Message-ID:  <Pine.GSO.4.43.0203122142500.1141-100000@nova.fnal.gov>
In-Reply-To: <B8B41FBA.5835%timster@blackcore.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.43.0203122142500.1141-100000>