Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Setting System Date and Time Programitically
Message
From
20/12/2017 16:40:01
 
 
To
19/12/2017 12:42:57
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01656542
Message ID:
01656606
Views:
58
Ah!!!!! i dont understand your initial request.

ok now you want to change the PC system clock.
the better way is to do it manually (good for a single workstation !).

1. Manually: right click on the clock(right bottom screen),or dblclick and follow interface to change date & time...
Actually in my win10 date & time are adjusted automatically from the timezone but there is way to adjust them manually.
can visit https://www.computerhope.com/issues/ch000554.htm
there is manual methods to adjust date & time in diffrent windows versions.

2.programmatly you can find a code (win XP) to set the PC system time o a given date( use of setLocalTime api):
https://www.foxite.com/archives/getsystemtime-and-setsystemtime-0000159829.htm
not tested (and i dont want to test it) because i am in win10 fall creator and i doubt if it works (maybe work on your win7).

as others pointed be carefull with other apps using the system time....

good luck!

update : can see also this link (not tested) (lternate Method to Set local Time from Server ): http://www.tek-tips.com/faqs.cfm?fid=3536
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform