Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
A way to change system date/time programatically from VF
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00135525
Message ID:
00135714
Vues:
14
Better use SetLocalTime(). SetSystemTime() uses UNC/GMT time.

Vlad

>The function you're looking for is SetSystemTime(). Here's the declaration:
>DECLARE SHORT SetSystemTime IN Win32API;
>  STRING @lpst
>* lcsystime is a simulated SYSTEMTIME structure
>llresult = (SetSystemTime(@lcsystime) # 0)
>The SYSTEMTIME structure is simulated as a 16 byte string. Bytes 1-2 are the year, bytes 3-4 the month, bytes 5-6 the day of the week (but is ignored), bytes 7-8 are the day, bytes 9-10 the hour, bytes 11-12 the minute, bytes 13-14 the seconds, and bytes 15-16 the milliseconds.
>
>You'll need to use a function that will convert the necessary values to 2 character strings, in low byte, high byte order and concatenate them together.
>
>hth,
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform