Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Incorrect DateTime() result
Message
 
À
26/03/2020 08:20:55
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
01673795
Message ID:
01673839
Vues:
41
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform