wood burning stoves 2.0*
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 EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Setting the System date" Watch "Setting the System date" New topic
Author

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
Bartender

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: http://aspose.com/file-tools
 
subject: Setting the System date
 
Similar Threads
Date Question
Regarding the date obtained using java.util.Date class
How to get tomorrow's date?
Problem inserting a null date into a MDB
compare two dates thru Calendar