Get Server Time

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • raghavv
    New Member
    • Apr 2009
    • 12

    Get Server Time

    Hi,
    I have developed a desktop application and i am running it on a network.I have stored the application in one computer(Server ) and have shared it .I access this application from other systems(Clients ) by mapping the shared folder and creating a shortcut to it.
    In the program i use Date d=new Date() which gives me the date of the client.Is there any means of getting the Server date or syncronizing all systems.

    Thank you.
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    Originally posted by raghavv
    Hi,
    I have developed a desktop application and i am running it on a network.I have stored the application in one computer(Server ) and have shared it .I access this application from other systems(Clients ) by mapping the shared folder and creating a shortcut to it.
    In the program i use Date d=new Date() which gives me the date of the client.Is there any means of getting the Server date or syncronizing all systems.

    Thank you.
    Sure you can but your server has to cooperate; as it is now that server machine is just a file server. You need to have a little program running there that gives you the server's time stamp. IMHO the RMI mechanism is the easiest mechanism to use in Java. Read Sun's tutorials about it.

    kind regards,

    Jos

    Comment

    Working...