Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Incorrect DateTime() result
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
01673795
Message ID:
01673895
Vues:
66
Hi

The problem turned out to be with Dell's Rack Access Controller. It was out by 3 hours and once the data centre got it fixed Windows Server started reporting the correct time. I do not know exactly who the Rack Access Controller interacts with my server but clearly it does have some effect on the time. I ran my services today after the fix and all the times being reported are correct.

Simon

>Yes I have done that and the local time on the screen is correct but the task time is incorrect.
>
>>>Below is the code used to write comments to the log file. The DateTime() function is 3 hours different from the local time when run as a scheduled task. If I run this code on the server from the VFP command Window the time is correct. The same is true if I use the WINAAPI GetLocalTime(). The application does not read any config file. GetStartIn() is a function that returns the directory where the application started and where the log file is located.
>>>
>>>
>>>   Procedure WriteToLog
>>>      LParameter tcText
>>>      =StrToFile(Ttoc(DateTime(),3)+"  "+tcText+DC_CRLF,GetStartIn()+"dCFusionTasks.log",1)
>>>      Return
>>>   EndProc
>>>
>>
>>Try to log in as the account used for the scheduled task and run it manually, or to create a copy of the task to run under your account and run it as scheduled. See if that changes anything when you run it that way. Scheduled tasks run in their own environment, defined by the account - they use the account's folders, private settings, rights etc etc.
Simon White
dCipher Computing
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform