File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes How to get the TimeZone of a remote machine Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "How to get the TimeZone of a remote machine" Watch "How to get the TimeZone of a remote machine" New topic
Author

How to get the TimeZone of a remote machine

Manish Ramrakhiani
Ranch Hand

Joined: Aug 20, 2009
Posts: 44
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.
Dawn Charangat
Ranch Hand

Joined: Apr 26, 2007
Posts: 249
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

Joined: Aug 20, 2009
Posts: 44
Thanks Dawn,
I will see what is feasible for me.

Thanks,
Manish Ramrakhiani.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to get the TimeZone of a remote machine