Yes you're right - you need the core.dll
[DllImport("coredll.dll", SetLastError=true)]
static extern bool SetLocalTime(ref SYSTEMTIME lpSystemTime);
public struct SYSTEMTIME
{
public short year;
public short month;
public short dayOfWeek;
public short day;
public short hour;
public short minute;
public short second;
public short milliseconds;
}
public static void SetSystemDateTime(DateTime dt)
{
SYSTEMTIME systime;
systime.year = (short)dt.Year;
systime.month = (short)dt.Month;
systime.day = (short)dt.Day;
systime.hour = (short)dt.Hour;
systime.minute = (short)dt.Minute;
systime.second = (short)dt.Second;
systime.milliseconds = (short)dt.Millisecond;
systime.dayOfWeek = (short)dt.DayOfWeek;
SetLocalTime(systime);
}