Login
`
Templates, Tools and Utilities
|
||
Icetips Article
Back to article list
Search Articles
Add Comment
Printer friendly
Direct link
Par2: Geting GMT/UTC from Windows 2003-05-27 -- Scott Ripley Here's a completed source module that does the trick
program
map
MODULE('Windows32')
GetSystemTime(*SYSTEMTIME),PASCAL,RAW
END
end
SystemTimeType GROUP,TYPE
wYear USHORT
wMonth USHORT
wDayOfWeek USHORT
wDay USHORT
wHour USHORT
wMinute USHORT
wSecond USHORT
wMilliseconds USHORT
END
SystemTime LIKE(SystemTimeType)
UTC_Date LONG
UTC_Time LONG
CODE
GetSystemTime(SystemTime)
UTC_Date = DATE(SystemTime.WMONTH,SystemTime.WDAY,SystemTime.WYEAR)
UTC_Time = (SystemTime.WHOUR * 360000) + |
(SystemTime.WMINUTE * 6000) + |
(SystemTime.WSECOND * 100)
MESSAGE('Date =<9>'&FORMAT(UTC_Date,@d4) & |
'|Time =<9>'&FORMAT(UTC_Time,@t6),'UTC Time')
Today is November 21, 2024, 4:00 am This article has been viewed 35222 times.
|
|