得到确切的时间,一个远程服务器 [英] Get the exact time for a remote server

查看:219
本文介绍了得到确切的时间,一个远程服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在C#中,我怎么查询远程服务器的当前时间?

In C#, how do I query a remote server for its current time?

类似的功能

net time \\servername

但返回一个时间戳,包括秒。

but returning a datestamp that includes seconds.

感谢

推荐答案

Windows时间服务实现了NTP。这里是一个 C#实现了NTP客户端。它使用一个Windows图形用户界面可以在简单网络时间协议客户端被发现。这是由Valer博灿。

Windows Time Service implements NTP. Here is a C# implementation of an NTP client. A Windows GUI using it can be found at Simple Network Time Protocol Client. It's by Valer Bocan.

这篇关于得到确切的时间,一个远程服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆