File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes Setting the System date Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Setting the System date" Watch "Setting the System date" New topic

Setting the System date

Rakesh Rajagopalan
Ranch Hand

Joined: Sep 19, 2006
Posts: 59
How can i get and set system date? I need to synchronize my system's date/time with that of a server for every 30 minutes. Can you give me this coding?
Paul Sturrock

Joined: Apr 14, 2004
Posts: 10336

Get is easy:

Setting it however is not. My guess is you would need to call a native method in the OS to do this (since it is the OS that tells the JVM the current time).

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
I agree. Here's the link:
subject: Setting the System date
jQuery in Action, 3rd edition