Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to set the computer clock from VFP ?
Message
From
18/10/2000 20:32:13
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00431253
Message ID:
00431255
Views:
17
>Hi All
>
>I need to create some kind of Time Synchronization scheme, but unfortunately I can not find a command to set the clock of the computer directly from VFP (VFP5a) and also a VFP command to retrieve the time from a server (NT Server).
>
>I hope someone can help me out.

The trivial way toget the date from a remote system is to FCREATE() a temporary file on the server; the time/date stamp on the file is determined by the system where the file is created, not the local workstation's time. Use ADIR() to retreive the time/date stamp on the file. Given that, there's a Win32 API function that will set the system clock to the new value. There's sample code in the FAQ that shows how to do this.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform