Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Question about net time dos command
Message
 
À
18/04/2004 23:16:50
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00895989
Message ID:
00896225
Vues:
17
>>can i get the date and time generated by the dos command, net time \\domainserver1 ???
>
>I assume the command sends output to the screen. You might redirect this command to a text file:
>
>
>net time \\domainserver1 > timefile.txt
>
>
>and then parse this file.
>
>An option I have used to get the date and time, is to create a temporary file on the server, and get its date/time. The file will be created with the date/time of the server, not the user's machine. I don't know whether this applies to all combinations of NOS and workstations. I tried it with Windows NT server, and Windows 95 / 98 workstations.

I think it works everywhere, I've never seen it fail, anyway. The problem is only whether the "base" time of server is actually correct :-) At least twice, when servers had hardware problems starting, I've seen them give the wrong time by hours, not just minutes or seconds...but these problems are quite rare.

Here, we set one certain server's clock by the Naval Observatory constantly (like once every minute), and then all other servers are scheduled to set their time from this server (I do my server-synchronizations 3 times a week, that seems enough). Then you set the workstation-time from any server at login, and everything is pretty well in sync this way.
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform