Alex Rivera | Logout

Java - How to get current date independent from system date?

Asked 2010-05-23T12:08:26.530
17

I want to know the current Date and Time.

The code

Calendar.getInstance();

represents a date and time of the system on which the program is running and the system date can be wrong.

So Is there any way by which I can get correct current date and time irrespective of the date and time of the system on which program is running?

Edit
Report

1 Answer

0

The programming level methods are developed to Get Date and Time from your system itself. You cannot modify them to get the dates except than the System specified.

For your additional requirement, if you wish to really have it, you would require a Synchronization between your Client Machine and Server.

answered 2010-05-23T12:13:44.907

Your Answer