Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
UTC time from operating system
Message
From
04/03/2013 15:48:57
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01567393
Message ID:
01567402
Views:
62
>>>Hi Gang!
>>>
>>>Do you have any code that gets the UTC time form the operating system?
>>>
>>>Thanks!
>>
>>IIRC the idea is to get the time offset from the OS (no direct UTC function IIRC) and add that to the OS time. I've done it before in VFP (long long ago). I'll check my source if you don't get a good answer by evening..
>
>sounds good!

It's better to use call to API that returns UTC (there is one -- GetSystemTime() ). Trying to fiddle with time offsets doesn't work too well when you're within that 1-hour window on the transition from Daylight to Standard time where local time repeats.
Previous
Reply
Map
View

Click here to load this message in the networking platform