Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sync system time
Message
De
01/11/2013 04:54:46
 
 
À
31/10/2013 14:45:49
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 8
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01586885
Message ID:
01587073
Vues:
94
simple yes, but now you rely on a path to the server (likely one already in use of your app, so less chance of breaking)...

Did you try the
See: How to use the NetRemoteTOD function to obtain date and time information from a server http://support.microsoft.com/kb/249716/EN-US/

from the link provided ? Sounded nice&fitting (the one I bookmarked to try if needing it without a SQL backend), but might have also run into newer permission issues.

curious

thomas


>For those interested, I found this to be my simplest solution. I was unable to get the Joetools to work or the complicated gettime and settime procedures.
>
>I need to get the time from my server independent of my client. Since I can no longer "ask the server" what time it is without a major security headache; I came up with this; (I:\ is of course a network drive on my server)
>
>
>If File('i:\data\ecnc\data\setservertime.txt')
>	Delete File 'i:\data\ecnc\data\setservertime.txt'
>ENDIF
>cFileDesc='File is created and deleted on the server so that the time can be retrieved from the remote server independant of the client ' + TTOC(DATETIME())
>
>Strtofile(cFileDesc,'i:\data\ecnc\data\setservertime.txt')
>
>? Datetime() &&returns the client datetime
>? Fdate('I:\DATA\ecnc\Data\setservertime.txt',1) &&returns the server datetime
>
>
>there is only second or two difference between the two when the clocks are synched.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform