使用 C# 以编程方式设置时间 [英] Set time programmatically using C#

查看:23
本文介绍了使用 C# 以编程方式设置时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在远程机器上远程设置时间的最佳方法是什么?机器运行 Windows XP 并通过 Web 服务调用接收新时间.目标是保持远程机器与服务器同步.系统已锁定,因此只能访问我们的 Web 服务,因此我无法在每台远程机器上使用时间服务器.

What is the best way to set the time on a remote machine remotely? The machine is running Windows XP and is receiving the new time through a web service call. The goal is to keep the remote machines in synch with the server. The system is locked down so that our web service is the only access, so I cannot use a time server on each remote machine.

推荐答案

我会使用 Windows 内置的 Internet 时间功能.您可以在您的服务器上设置一个时间服务器,让它从第二层获取时间时间服务器,并让您的所有客户端机器从中获取时间.

I would use Windows built-in internet time abilities. You can set up a time server on your server, have it get time from a 2nd-tier timeserver, and have all your client machines get time from it.

我之前一直走在应用程序设置系统时间的道路上.

I've been down the application-setting-system-time road before.

这篇关于使用 C# 以编程方式设置时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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