HP/UX Java 1.3.1.02 date/time differences

S

Steffen Huebner

Hi!

We seem to have differences between the unix system time (coming from
an NTP server) and the time our java application has (as it produces
timestamps).
At the start of the app the time is synchro and after about 2 weeks
the time is 20secs ahead of the system time...

Does the Java VM calculates the current time by its own (i.e. counting
secs from start)? Or should it better get the time (if
System.currentTimeMillis() is called) from the host system?

Regards,
Steffen
 
R

Roedy Green

We seem to have differences between the unix system time (coming from
an NTP server) and the time our java application has (as it produces
timestamps).
At the start of the app the time is synchro and after about 2 weeks
the time is 20secs ahead of the system time...

Keep your machines is sync by having them check in with an NTP server.
See http://mindprod.com/jgloss/atomiclock.html

PC's have two clocks, an accurate one, and a time of day ticks since
midnight that is reset on boot. Modern tick clocks are pretty
accurate, but on older machines, they will get out of whack if you
don't reboot daily or resync from the clock calendar. Since accessing
the tick clock is faster, that's what you normally get from Windows
OS.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top