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:
01673811
Vues:
55
Hi

I signed into the server using the same credentials as the service and the time was correct but the service is still out by 3 hours.

Simon

>Funny you should mention that because I was just thinking the same thing. So the answer is no but I will check it now.
>
>Thanks,
>Simon
>
>>>Hi
>>>
>>>I have VFP processes that run on Windows Servers and notice that if I run the process from the VFP command window the result from the DateTime() function matches the local time. However if I then run the same code as a Scheduled Task in Windows then the result from the DateTime() function is out 3 hours. So if the local time is 5:30am then the DateTime() reports 2:30a. This only happens when run from ShellExecute() as a compiled executable or in the Task Scheduler. Upon further investigation I discovered that the WinAPI GetLocalTime() does exactly the same thing.
>>>
>>>This is happening on all my Windows Servers (2012, 2016 and 2019). However, they all have the correct time zone setting and the clocks all display the correct local time (EDT). So I had to created my own functions that retrieve the server's UTC time and convert it to local time which works just fine. However, I wondered if others have seen this type of behavior.
>>
>>Have you checked the regional settings for the account under which you're running the scheduled tasks?
Simon White
dCipher Computing
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform