使用C#在Vista和Windows 7上更改时区 [英] Changing Time Zone on Vista and Windows 7 using C#

查看:88
本文介绍了使用C#在Vista和Windows 7上更改时区的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好

我正在搜索可以更改Vista和Windows 7计算机上系统时区的有效C#代码.我编写了一个示例代码,该代码将SetDynamicTimeZoneInformation函数与SE_TIME_ZONE_NAME特权一起使用(由 AdjustTokenPrivileges api)无法在这些操作系统上运行.

Hi Everyone

I am searching for working C# code that can change system time zone on Vista and Windows 7 machines. I have written a sample code that uses SetDynamicTimeZoneInformation function with SE_TIME_ZONE_NAME privilege (set by AdjustTokenPrivileges api) that is not working on these OS.

如果您有可行的解决方案,请分享.

推荐答案

您好

Hello

 

谢谢您的发帖!我建议将您的问题发布到其中之一

Thank you for your post!  I would suggest posting your question in one of the

Microsoft Developer Network > Forums Home > Visual C# Forums > Visual C# Language


这篇关于使用C#在Vista和Windows 7上更改时区的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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