1. Server must send to client datetime formatted as: yyyymmddho:mi:se (ho: hour;mi:minute; se:second )
Proc GetAndReturnDatetime
Retu Dtos(date)+time()
Endproc
2.Clients get string of datetime from server, it will SetSystemTime on client PC
kk = GetDateTimeStringFromServer()
yy = val(left(kk,4))
mm = val(subs(kk,5,2))
dd = val(subs(kk,7,2))
hh = val(subs(kk,9,2))
mi = val(subs(kk,12,2))
se = val(left(kk,2))
=SetSysTime(yy,mm,dd,hh,mi,se)
Proc SetSysTime
lpara pYear, pMonth, pDay, pHour, pMin , pSec
Decl long SetSystemTime in win32api string && string =space(40)
Decl long GetSystemTime in win32api string@ && string =space(40)
Declare long PostMessage in win32api long,long,long,long
local cBuff, t
cBuff=space(40)
=GetSystemTime(@cBuff)
On server, you can use winsock to broadcast datetime on spicific port.
On clients, you can use winsock to listen to that port and capture datetime string.
If there is something unclear, pls reply
Hope it helps
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.