Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
GMT time
Message
 
À
08/04/1998 17:34:11
Mark Lauahi
Advanced Motion Controls
Camarillo, Californie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Titre:
Divers
Thread ID:
00090272
Message ID:
00091700
Vues:
31
>What do you have. I would be very interested in what you have and how it works.

In C here's what you need to do... I have wrapped this into wwIPStuff a while
back to calculate time offset from my Web server to people downloading
messages to their local machines. The functions returns NT UTC time which
is actually -1 * GMT offset. Go figure - MS not following one of the
most basic standards...

/// Returns time offset from GMT in Hours (NT UTC time)
int WINAPI GetTimeOffset()
{
TIME_ZONE_INFORMATION TimeZoneInformation;

GetTimeZoneInformation(&TimeZoneInformation);
return TimeZoneInformation.Bias / 60;
}

To call from VFP you'd use. Note you need to download
wwIPSTuff.dll from the libraries here...

************************************************************************
* API :: GetTimeZone
*********************************
*** Function: Returns the local time zone based on UTC
*** Return: hour offset or -1 on error
************************************************************************
FUNCTION GetTimeZone
LOCAL lcStruct, lcBias, lnErr

DECLARE INTEGER GetTimeOffset ;
IN WWIPSTUFF

lnBias=GetTimeOffset()

RETURN lnBias
* GetTimeZone
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform