Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Change time in Foxpro-session
Message
De
25/08/2010 01:10:08
 
 
À
24/08/2010 00:16:09
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01477896
Message ID:
01478296
Vues:
41
>>>Does anyone know if/how I can change the datetime in my Visual Foxpro-application ?
>>>
>>>After starting our application, in some occasions, i must be able to set the date a year ahead without changing the Windows datetime.
>>>So when i call the Date(), Time() or DateTime()-function I must get a later date returned...
>>
>>
>>You can run your application under VM and change whatever you want w/o affecting other applications or Windows itself..
>
>Modern Windows OSs will, by default, periodically attempt to synchronize their time to time.windows.com. VMs are no different. To maintain a datetime a year ahead would mean disabling synchronization, or disconnecting the computer from the public Internet so synchronization attempts fail.
>
>Lack of accurate/synchronized time can make some Windows services fail e.g. Kerberos.

By coincidence, just today I was working on a computer (Vista32) whose date was way off - it thought it was 2002. This had some interesting side effects:

1. Although the Windows Time Service/NTP client was properly configured to synchronize with time.windows.com, the client was refusing to set the datetime correctly because there is a maximum number of seconds of adjustment it is allowed to apply (in this case, considerably less than 8 years). So, the date required manual adjustment.

2. Windows Update fails with an obscure 0x8007xxxx code if the datetime is wrong. So, a machine may get way behind on Microsoft updates.

3. Most, if not all https: secure web sites fail. If you look at the error details, you get something like "the certificate is not valid until {some date in the [real] future}". You think, WTF? until you realize that the START of the certificate's valid period is later than the computer's time, and for some reason the error message reports the END of the certificate's valid period. For example, a certificate may be valid from May 2008 to May 2013, so a browser will complain if it thinks the current date is in 2002.

Simply manually adjusting the date correctly fixed all these weird problems - accurate time syncs now working, a whole raft of Windows updates coming through, secure sites now working properly.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform