开发者

How do I set the system time?

开发者 https://www.devze.com 2023-03-20 03:06 出处:网络
On windowsXP and onwards, if you set the datetime to hijri开发者_JS百科 calendar an option is provided to adjust it in \"Regional and Language Options\".

On windowsXP and onwards, if you set the datetime to hijri开发者_JS百科 calendar an option is provided to adjust it in "Regional and Language Options".

What I want to do is to either adjust the hijri date using C# or set system date to my own calculated hijri system date?

Any help


Changing system datetime can be done by importing the SetLocalTime function:

[DllImport("kernel32.dll")]
static extern bool SetLocalTime([In] ref SYSTEMTIME lpLocalTime);

You have to calculate your local time based on the hijri time.

0

精彩评论

暂无评论...
验证码 换一张
取 消