I\'m having a hard time getting SetSystemTime working in my C# code. SetSystemtime is a kernel32.dll function. I\'m using P/invoke (interop) to call it. SetSystemtime retu
You can't just add 3000 to the seconds field. You need to specify a number of seconds between 0 and 60. You need to adjust the seconds, minutes, hours, etc fields so that they are all within a valid range.
Edit
The simplest way would actually be to call SystemTimeToFileTime then add numSeconds * 10000
to the value it gives back, and then call FileTimeToSystemTime to convert back to a SystemTime.