Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Problem with System.currentTimeMillis()

user9012483Apr 14 2014 — edited Apr 22 2014

I noticed with the java version "1.7.0.06" the function call to System.currentTimeMillis() is a second ahead of the date of the system.

In a thread is always active(Ex: Servlet) everyday the difference between the system date and the date retrieved by the function System.currentTimeMillis() from the JVM increases by one second.

Has anyone encountered the same problem?

Andrea

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 20 2014
Added on Apr 14 2014
22 comments
10,873 views