Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to get the current time of a computer in a network !
Message
 
To
29/07/2003 04:26:56
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00814446
Message ID:
00814506
Views:
12
>I need to get the current time of a computer in a LAN. I can get several approaches:
>
>1. The easyest: each computer to update a local file/table and where to write a current time at lets say 5 seconds. This requires a time on the application and it's not very safe.
>
>2. Using winsock activex or sockets sdk (in a VC dll) and to transmit the time my this means. This is very clean but takes some time, time that i don't currently have.
>
>3. Use some notwork sdk function that get the remote time of a computer. The bad part is that i don't know such function.
>
>I would be greatful for any sugestions.

Do you have access to the internet on these machines? or a SNTP server on the local network?

If so you can easily use the SNTP protocol to synch with time servers around the internet which are highly precise Many based off atomic clocks.

I have a control that facilitates in this by handling the protocol, also allows you access to Universal Coordinate Time as well as the local conversion on the computer based on time zone.

http://www.SeekfordSolutions.com/Products/SNTPWizard/

It has foxpro examples as well as most other development languages.

If you have any questions I am happy to help.

By the way, the time to implement is less than five minutes.
Brian Seekford
Seekford Solutions, Inc.
http://www.SeekfordSolutions.com
Internet ActiveX Controls and .NET Class Libraries.
SMTP/S FTP POP3/S HTTP/S SNTP MIME PING WHOIS TRACEROUTE NNTP DNS MX
Base64, UUEncode, yEnc, MD5, SHA1, URL, Quoted-Printable.
Resizer and Tooltips
Email Verification and more. Check us out!
Previous
Reply
Map
View

Click here to load this message in the networking platform