Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Local time and System time
Message
From
17/12/1999 17:01:13
Alex Zhadanov
Computer Generated Solutions
New York City, New York, United States
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00305457
Message ID:
00305500
Views:
20
>>>>Hi folks.
>>>>Who can tell me what difference between local time and system time.
>>>>I have problem with timestamp field.
>>>>If person in NY at 11 AM (Eastern time) create new record
>>>>timestamp will be 11. And if person in LA create new record one hour
>>>>later timestamp show 9 AM (local time in LA).
>>>>I found 2 API SETLOCALTIME and SETSYSTEMTIME but i do not know
>>>>how they can help me.
>>>>Thank you in advance
>>>
>>>Hi Alex,
>>>
>>>The Win32 has several functions that can help. These would be: SystemTimeToFileTime, LocalFileTimeToFileTime, and FileTimeToSystemTime. The first function converts a SYSTEMTIME structure to a FILETIME structre. The second, coverts a the local file time to the corresponding UTC filetime. The last converts a FILETIME structure back to a SYSTEMTIME sturcture. Something like Cristof Lange's Structure from the download section might be of help. I've used these functions without it. They're not terribly complex.
>>
>>Thank you George.
>>But i do not understand how these conversions fuctions can help me to
>>keep right timestamp in table. As i understand these functions only convert
>>one type of date and time to another. Could you elobarate this question.
>>Thank you. Alex
>
>Certainly, Alex.
>
>I suggest converting the timestamps to UTC time. Provided the computer is properly set up with the correct time zone information, these functions can be used to convert the timestamp to UTC time. Since UTC time is a fixed point and not subject to things such as daylight savings, this would solve the problem.
>
>Does this help? Or would you like some more information?

Sorry George But i forget to ask very small question.
What the difference between local time and system time?
Thank you.Alex
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform