My test code is below.
Regards,
James
- Code: Select all Expand view
#include "fivewin.ch"
#define HKEY_LOCAL_MACHINE 2147483650 // 0x80000002
// This is the value we want
//"HKEY_LOCAL_MACHINE\System\CurrentControlSet\" &_
// "Control\TimeZoneInformation\ActiveTimeBias"
function main()
msgInfo( len( getUTCTimeOffset() ) )
return nil
// Purpose: To read the UTC (GMT) time offset from the registry
function getUTCTimeOffset()
local nHandle, nValue
if RegOpenKey( HKEY_LOCAL_MACHINE,;
"System\CurrentControlSet\Control\TimeZoneInformation",;
@nHandle ) == 0
RegQueryValue( nHandle, "ActiveTimeBias", @nValue )
RegCloseKey( nHandle )
endif
return nValue