using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;
namespace 自动校正时间
{
class SetTime
{
//结构
public struct SystemTime
{
public short wYear;
public short wMonth;
public short wDayOfWeek;
public short wDay;
public short wHour;
public short wMinute;
public short wSecond;
public short wMilliseconds;
}
//API声明
[DllImport("kernel32.dll", SetLastError = true)]
public static extern int SetLocalTime(ref SystemTime lpSystemTime);
}
}