This repository has been archived on 2022-08-05. You can view files and clone it, but cannot push or open issues or pull requests.
2020-05-25 19:32:53 +02:00
|
|
|
|
using System;
|
|
|
|
|
using CC_Functions.W32.Native;
|
2020-02-01 15:32:03 +01:00
|
|
|
|
|
|
|
|
|
namespace CC_Functions.W32
|
|
|
|
|
{
|
|
|
|
|
public static class Time
|
|
|
|
|
{
|
|
|
|
|
public static void Set(DateTime time)
|
|
|
|
|
{
|
|
|
|
|
time = time.ToUniversalTime();
|
|
|
|
|
kernel32.SYSTEMTIME st = new kernel32.SYSTEMTIME
|
|
|
|
|
{
|
|
|
|
|
wYear = (short) time.Year,
|
|
|
|
|
wMonth = (short) time.Month,
|
|
|
|
|
wDay = (short) time.Day,
|
|
|
|
|
wHour = (short) time.Hour,
|
|
|
|
|
wMinute = (short) time.Minute,
|
|
|
|
|
wSecond = (short) time.Second
|
|
|
|
|
};
|
|
|
|
|
kernel32.SetSystemTime(ref st);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|