Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Date Time Problem Over Network  RSS feed

Khurram Mahmood
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can I get the Show correct current GMT over the network in an applet as it is not predictable whether or not the client has correct date?
I am using following code I have to display time of five different countries.

private void getTime(String server)
URL url = new URL("http://"+server);
URLConnection ucon = url.openConnection();
ucon.connect() ;
long l = ucon.getDate();
Date d= new Date(l);
}catch(Exception e)
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!