Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
A way to change system date/time programatically from VF
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00135525
Message ID:
00135714
Views:
13
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,
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform