Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > HP/UX Java 1.3.1.02 date/time differences

Reply
Thread Tools

HP/UX Java 1.3.1.02 date/time differences

 
 
Steffen Huebner
Guest
Posts: n/a
 
      04-30-2004
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
 
Reply With Quote
 
 
 
 
Roedy Green
Guest
Posts: n/a
 
      04-30-2004
On 30 Apr 2004 05:36:33 -0700, (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

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.
 
Reply With Quote
 
 
 
 
Liz
Guest
Posts: n/a
 
      04-30-2004

"Roedy Green" <> wrote in message
news:...
> On 30 Apr 2004 05:36:33 -0700, (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.



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DEVELOP THE WINNING EDGE, SMALL DIFFERENCES IN YOUR PERFORMANCE CANLEAD TO LARGE DIFFERENCES IN YOUR RESULTS Home_Job_opportunity C Programming 0 01-14-2009 03:51 PM
DEVELOP THE WINNING EDGE, SMALL DIFFERENCES IN YOUR PERFORMANCE CANLEAD TO LARGE DIFFERENCES IN YOUR RESULTS Home_Job_opportunity C Programming 0 01-08-2009 04:31 PM
Differences between C++ and Java Roedy Green Java 179 12-05-2005 11:41 PM
Differences between one-dimensional arrays in Java and C Paul Morrison Java 1 05-01-2005 04:37 PM
Differences between C++ and Java cyberdude Java 36 09-17-2003 01:36 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57