Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
UTC time Conversion
Message
De
02/05/2013 21:02:35
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows 2000 SP3
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01572478
Message ID:
01572587
Vues:
69
>>Basically -- it's better to get the UT directly rather than convert form local time. Part of the snag is functions like DATETIME() and TIME() *don't* tell you if the time they return are in terms of standard local time or daylight local time -- and specifically a problem on the day on which the transition from daylight to standard occurs -- local time repeats (and in the case of the USA where daylight saving occurs, there is a 1-hour "window" where local time repeats -- once for daylight, and once again for standard).
>
>DateTime() and Time() are always returned in the active locale that Windows is running under so you can find out what that is by calculating the timezone offset with GetTimeZone() from Win32.
>
>+++ Rick ---

Of course, if you can get Universal Time directly from the API ( If I remember correctly the function is GetSystemTime() ), why bother trying to go through the trouble of doing API calls to determine the offset just so you can do the computation?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform