Information générale
Catégorie:
Fonctions Windows API
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.
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement