Click here to Skip to main content
15,891,657 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to get datetime from internet not from server or client .

thanx in advanced
Posted
Updated 24-May-10 1:46am
v2

See this article;

Daytime, Internet Time Service Class[^]

It is vb.net, but will be easily portable to C#, or give you ideas onhow to do it your own way.
 
Share this answer
 
Comments
imaa2amha 24-May-10 2:58am    
thanx its very useful .
I googled the phrase "c# network time protocol" (you can too), and found this code:

http://www.google.com/codesearch/p?hl=en&sa=N&cd=1&ct=rc#GawBxmf1je8/NTP/NtpClient.cs&q=ntp%20lang:c%23&l=34[^]
 
Share this answer
 
Comments
imaa2amha 25-May-10 3:42am    
thanx man
You realise the time will come from A server somewhere, and it will be the time in the timezone of that server ?
 
Share this answer
 
Comments
#realJSOP 24-May-10 8:04am    
Shhhhh! We'll get more reputation points by waiting for him to ask about that. :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900