Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Feb 2002 17:14:17 -0600 (CST)
From:      Tim Zingelman <zingelman@fnal.gov>
To:        Timothy Kettering <timster@blackcore.com>
Cc:        FreeBSD-Java <java@FreeBSD.ORG>
Subject:   Re: Incorrect timestamps with native 1.3.1 jdk?
Message-ID:  <Pine.GSO.4.43.0202121709360.4642-100000@nova.fnal.gov>
In-Reply-To: <B88EF9CF.4E99%timster@blackcore.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 12 Feb 2002, Timothy Kettering wrote:
>
> The problem I have is that I'm getting timestamps that seem incorrect.  I
> wrote a very simple test application that instances a current Date object=
,
> then spits out the timestamp in a long format.  I compared that with the
> timestamp that's returned on my OSX development machine which I ran at th=
e
> same time.
>
> They're really different (more than just a few milliseconds difference). =
 I
> did more investigation by formatting the date to a string using
> SimpleDateFormat and I'm seeing that the freebsd java implementation appe=
ars
> to be 12 hours ahead of the current time.  Running the same application o=
n
> my OSX box returns the current time correctly.  I.e. If it were 4PM now, =
the
> java application on the freebsd box would say its 4AM the next day.
>
> I checked the server clock to be sure, and the server clock is set to the
> correct time and timezone.
>
> I checked the system properties, and the freebsd jvm doesn=B9t report any=
thing
> for the user.timezone.  (returns an empty string), on my OSX machine, the
> same program returns an empty string as well.  I checked that and other
> system properties which were returned, as part of a loop, so it can't
> because I coded it wrong or something.
>
> I'm in CST (central standard time, GMT +600) if that helps.

We currently use the linux-jdk, but we put:

  TZ=3DCST6CDT

in the environment and that seems to make things work.

 - 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.0202121709360.4642-100000>