HP/UX Java 1.3.1.02 date/time differences  
Author Message
hueb_s





PostPosted: 2004-4-30 20:37:00 Top

java-programmer, HP/UX Java 1.3.1.02 date/time differences 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
 
Liz





PostPosted: 2004-5-1 3:29:00 Top

java-programmer >> HP/UX Java 1.3.1.02 date/time differences
"Roedy Green" <email***@***.com> wrote in message
news:email***@***.com...
> On 30 Apr 2004 05:36:33 -0700, email***@***.com (Steffen Huebner) wrote
> or quoted :
>
> >
> >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
>

Win XP uses NTP once per week to reset the clock.

> 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.
>
>
>
> --
> Canadian Mind Products, Roedy Green.
> Coaching, problem solving, economical contract programming.
> See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.