C ++管理:更改本地或UTC日期&时间 [英] C++ mangaged : changing local or UTC date & time

查看:156
本文介绍了C ++管理:更改本地或UTC日期&时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写一个用于在PC之间同步日期和时间的简单服务.

如何使用可视点网C ++ API更改PC日期时间(本地或全局)?
我想我也需要特权.

最好的问候.

I''m writing a simple service for synchronizing date&time between PC''s.

How to change PC date-time (local or global) with visual dotnet c++ API ?
I think I need to require privilege to do it too.

Best regards.

推荐答案

请参见Win32_OperatingSystem类的 SetDateTime方法 [
See SetDateTime method of the Win32_OperatingSystem Class [^]

[UPDATE] and ::SetSystemTime().


这篇关于C ++管理:更改本地或UTC日期&时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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