Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Time Zones
Message
From
22/09/2008 11:39:16
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01349318
Message ID:
01349505
Views:
29
I'm sorry, pretend I'm even more stupid than it appears and explain it to me again. If I'm running this on a PC that is the EST time zone why is there an offset? I thought the point was to end up with the date and time that the app is running in.

>You're adding Timezone offset for your PC to the local time on the same PC. The local time has that offset already applied to it.
>You can get GMT/UTC time as comment in the code says
>
>? DATETIME() + lnTimeZoneOffset
>
>
>>Yes, I know I'm posting to myself. Doug must be busy, but I really need to figure this out. Can anyone see in the code why it would offset by 4 hours rather than just return the current date and time since it's all in the same time zone?
>>
>
>>
>>* You can then add lnTimeZoneOffset to a local time value to get a time in Greenwich
>>* Mean Time (GMT) or subtract lnTimeZoneOffset from a time value in GMT to obtain a
>>* local time value.
>>
>>? DATETIME() - lnTimeZoneOffset
>>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform