I am using basically the code below to accomplish my task. First, I store the current time in a systemtime type variable called restoretime. Next, I want to set the time to a predefined time that I select. Lastly, I want to restore the time that I saved in restoretime exactly as it was(progression of time is not an issue because my code runs very quickly).

GetSystemTime(restoretime)
retval = setsystemtime(newtime)
' code
retval = setsystemtime(restoretime)

The problem is the code does not work; for some reason I can not get the restoretime to be returned correctly. It may have to do with the timezone issue, and it may require I use the bias value from GetTimeZone information. If you know how I can accomplish what I am trying to do, I would greatly appreciate it. Thank you very much.
Joe