Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What is the equivalent API function of NET TIME
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00691798
Message ID:
00695190
Views:
18
David,

I don't know the API function, or even if there is one, but if you want to set the time of your PC to that of another machine you could use

RUN NET TIME /SET \\

The full help info is:-

NET TIME
[\\computername | /DOMAIN[:domainname] | /RTSDOMAIN[:domainname]] [/SET]
[\\computername] /QUERYSNTP
[\\computername] /SETSNTP[:ntp server list]

NET TIME synchronizes the computer's clock with that of another computer
or domain, or displays the time for a computer or domain. When used without
options on a Windows Server domain, it displays the current
date and time at the computer designated as the time server for the domain.
This command allows setting the NTP timeserver for computername.

\\computername Is the name of the computer you want to check or
synchronize with.

/DOMAIN[:domainname] Specifies to synchronize the time from the Primary Domain
Controller of domainname.

/RTSDOMAIN[:domainname] Specifies to synchronize with a Reliable Time Server
from domainname.

/SET Synchronizes the computer's time with the time
on the specified computer or domain.
/QUERYSNTP Displays the currently configured NTP server for this computer
/SETSNTP[:ntp server list]
Sets the NTP time servers to be used by this computer. This
may be a list of IP addresses or DNS names separated by spaces.
If multiple timeservers are listed, the list must be surrounded
by quotes.
Previous
Reply
Map
View

Click here to load this message in the networking platform