Page 1 of 1
SetSystemDate
Posted: Tue Jun 03, 2003 10:28 am
by TeddyLM
How can i set a new system date from a pb app ?
Does anybody know a way ?
need your help !
Re: SetSystemDate
Posted: Tue Jun 03, 2003 10:59 am
by PB
For Windows only:
Code: Select all
; Sets date to Christmas day in 2003 at 6:30pm.
NewTime.SYSTEMTIME
NewTime\wDay=25
NewTime\wMonth=12
NewTime\wYear=2003
NewTime\wHour=18
NewTime\wMinute=30
NewTime\wSecond=00
SetLocalTime_(NewTime)
Note: For Windows NT, 2K and XP you may need to adjust system
privileges to adjust the time, but I'm not 100% sure how to do that.
SetSystemDate Works fine !
Posted: Tue Jun 03, 2003 12:08 pm
by TeddyLM
Works fine on W2k...
I'm working now... will test this evening on XP.
Thanks PB
Posted: Tue Jun 03, 2003 12:22 pm
by Berikco
Under Nt-2K-XP the user running the app must have te privilege to change the time.
No problem for a local administrator of course