• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to get the TimeZone of a remote machine

 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello All,

I just have the name/IP of some remote machine and want to know the time zone of the same.

Please let me know how this can be done in Java.

Thanks,
Manish Ramrakhiani.
 
Ranch Hand
Posts: 249
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I dont think you can do this in plain Java without any agent running in the remote system.

1. if the system is unix based, write a script (in the remote machine) which will return the time zone, and execute this script remotely using Java/SSH/SCP API.
2. same in windows, but instead of *.sh, you might want to look for a *.bat file or see if there are any MFC components that is available which can return the time zone.
3. if there is an SNMP agent running int he remote machine, you can try getting the data from the SNMP MIB as well (you might want to check out some SNMP libraries like the westhawk stack or snmp4j)

Hope this helps...
 
Manish Ramrakhiani
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Dawn,
I will see what is feasible for me.

Thanks,
Manish Ramrakhiani.
reply
    Bookmark Topic Watch Topic
  • New Topic