PROCEDURE CreateSystemTime LPARAMETERS ttTimeStamp #DEFINE WORD 2 #DEFINE LDWORD 8 IF VARTYPE(ttTimeStamp) # "T" ttTimeStamp = DATETIME() ENDIF LOCAL lcResult, ; lnYear, ; lnMonth, ; lnDow, ; lnDay, ; lnHour, ; lnMinute, ; lnSec * lnYear = YEAR(ttTimeStamp) lnMonth = MONTH(ttTimeStamp) lnDow = DOW(ttTimeStamp) - 1 lnDay = DAY(ttTimeStamp) lnHour = HOUR(ttTimeStamp) lnMinute = MINUTE(ttTimeStamp) lnSec = SEC(ttTimeStamp) * WITH THIS lcResult = .IntegerToString(lnYear, WORD) + ; .IntegerToString(lnMonth, WORD) + ; .IntegerToString(lnDow, WORD) + ; .IntegerToString(lnDay, WORD) + ; .IntegerToString(lnHour, WORD) + ; .IntegerToString(lnMinute, WORD) + ; .IntegerToString(lnSec, WORD) + ; .IntegerToString(0, WORD) ENDWITH RETURN lcResultThen you can update the time:
ltDateTime = DATETIME(2000,1,1,12,00,00) lsSysTime = CreateSystemTime(ltDateTime) DECLARE INTEGER SetLocalTime IN Kernel32 STRING SetLocalTime(lsSysTime)I used to do that after checking the time on the database server and then "syncronize" the time on the local machine.