从互联网获取DateTime [英] Get DateTime From The Internet
本文介绍了从互联网获取DateTime的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何从互联网而不是从服务器或客户端获取日期时间.
thanx in Advanced
how to get datetime from internet not from server or client .
thanx in advanced
推荐答案
查看本文;
白天,Internet时间服务类 [
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.
我用Google搜索了"c#网络时间协议"一词(您可以),并找到以下代码:
^ ]
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[^]
您意识到时间将来自某个服务器上的某个地方,而这将是该服务器所在时区中的时间?
You realise the time will come from A server somewhere, and it will be the time in the timezone of that server ?
这篇关于从互联网获取DateTime的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文