<summary> //Update system time //</summary> public CLA SS UpdateTime { //Set system time API functions [Dl Limport ("kernel32.dll")] private static extern bool Setlocaltime (ref SYSTEMTIME time); [StructLayout (layoutkind.sequential)] Private struct SYSTEMTIME { public short Year public short month; public short dayOfWeek; public short day; public short hour; public short minute; &NBSP; public short second; public short milliseconds; } //<summary> //Set up system time //</summary> //< param name= "DT" > Required time </param> //<returns> return system Time setting state, true for success, False for failure </returns> public static bool SetDate (DateTime DT) &NB Sp { SYSTEMTIME St; &NBS P St.year = (short) dt. year; St.month = (short) dt. Month; St.dayofweek = (short) dt. DayOfWeek; St.day = (short) dt. Day; &NBsp St.hour = (short) dt. Hour; St.minute = (short) dt. Minute; St.second = (short) dt. Second; st.milliseconds = (short) Dt.millisecond; BOOL RT = Setlocaltime (ref st); return RT; } }