How To Fetch Time From Putside Source On Unix Platform?

CAN ANY PLESE TEL ME,HOW CAN I FETCH TIME FROM SOME EXTERNAL SOURCE (eg. NETWORK TIME SERVER S 200) ON UNIX PLATFORM,PROVIDED TIME IS COMING FROM SOME IP "X".WHAT CODE SHOULD I RUN IN STARTUP

ntp is designed exactly for that.
Do you want a one-time piece of code to fetch time/date from a local server or do you want to keep the system clock in sync with a network time server?

Consider doing some reading - www.ntp.org

xntpd or ntpd may already be part of your system.

Some systems come with /usr/bin/ntpdate which does the onetime fetch and time set. Check yours.

tha NTS comes with a patch that supports only windows env, not UNIX,so to make it run on unix,i need to put a patch ,which in turn ,wil fetch time from my NTS.tha patch or demon watever they cal in unix is needed which can fetch time from NTS ,the moment system loads OS.like it usually do with RTC