Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Time Zones
Message
 
 
À
22/09/2008 10:58:46
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Divers
Thread ID:
01349318
Message ID:
01349494
Vues:
30
You're adding Timezone offset for your PC to the local time on the same PC. The local time has that offset already applied to it.
You can get GMT/UTC time as comment in the code says
? DATETIME() + lnTimeZoneOffset
>Yes, I know I'm posting to myself. Doug must be busy, but I really need to figure this out. Can anyone see in the code why it would offset by 4 hours rather than just return the current date and time since it's all in the same time zone?
>
>
>* You can then add lnTimeZoneOffset to a local time value to get a time in Greenwich
>* Mean Time (GMT) or subtract lnTimeZoneOffset from a time value in GMT to obtain a
>* local time value.
>
>? DATETIME() - lnTimeZoneOffset
>
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform