Hi,
this code is working for me:
[DllImport("kernel32.dll", EntryPoint = "SetSystemTime", SetLastError = true)]
public extern static bool Win32SetSystemTime(ref SystemTime sysTime);
private void button1_Click(object sender, EventArgs e)
{
SystemTime updatedTime = new SystemTime();
updatedTime.Year = (ushort)2008;
updatedTime.Month = (ushort)4;
updatedTime.Day = (ushort)23;
updatedTime.Hour = (ushort)10;
updatedTime.Minute = (ushort)0;
updatedTime.Second = (ushort)0;
Win32SetSystemTime(ref updatedTime);
}