Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Time Zones
Message
 
 
To
22/09/2008 10:58:46
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:
01349494
Views:
29
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
>
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform