Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Feb 2002 16:56:47 -0600
From:      Timothy Kettering <timster@blackcore.com>
To:        FreeBSD-Java <java@FreeBSD.org>
Subject:   Incorrect timestamps with native 1.3.1 jdk?
Message-ID:  <B88EF9CF.4E99%timster@blackcore.com>
In-Reply-To: <20020212155653.H68351-100000@puget.esil.univ-mrs.fr>

index | next in thread | previous in thread | raw e-mail


I searched the freebsd archives, and could only find one reference (from may
2000) to a similar problem with jvm 1.2.2, and no solution was posted.  I
hate asking on listservs, but I'm stuck here and would like to fix this.

I'm running 4.5 STABLE and using javavm 1.3.1 native (all installed via
ports)

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 the
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 appears
to be 12 hours ahead of the current time.  Running the same application on
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ąt report anything
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.

So, I guess what I'm asking is ideas or suggestions from more experienced
java developers on where I should be looking to try to figure out this.  I'm
thinking that mabye the freebsd jvm didnąt get the system values correctly,
and if not, how do I set them?

I'm in CST (central standard time, GMT +600) if that helps.

Thanks in advance.

-- 
Tim
http://www.blackcore.com


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message



help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?B88EF9CF.4E99%timster>