I have my own registry program that will get Hex values nicely. And my function library has a DWORDToNum function (mostly inspired by Ed Rauh's), so I'm set to sail. I just wish there was a native Foxtouch() that ignored timezone settings. Thanks, Rick.
>You've got the right one. I ended up making a small modification to REGISTER.PRG to read binary values, then use this routine:
>
>* Program....: ADJUST4TZ.PRG
>LPARAMETERS p_tOldDT
>#DEFINE HKEY_LOCAL_MACHINE -2147483646 && BITSET(0,31)+2
>LOCAL lcRegValue, lcRegfile, lnRetVal, oReg
>
>lnRegValue = 0
>lcRegfile = "REGISTRY"
>lnRetVal = 0
>
>SET PROCEDURE TO (m.lcRegfile) ADDITIVE
>oReg = CreateObject("Registry")
>
>lnRetVal = oReg.GetRegKey("ActiveTimeBias",@lnRegValue,;
>"System\CurrentControlSet\control\TimeZoneInformation", HKEY_LOCAL_MACHINE)
>
>IF lnRetVal = 0
>IF lnRegValue > 0x80000000 && East of GMT
>lnRegValue = lnRegValue-0xFFFFFFFF -1
>ENDIF
>ELSE
>lnRegValue = 0 && don't change anything
>ENDIF
>
>RELEASE oReg
>RELEASE PROC (m.lcRegfile)
>
>RETURN (p_tOldDT + lnRegValue*60) && *60 gives seconds
>
>>Thanks, Rick. I was just in the process of figuring out what the heck was going on.
>>
>>This is going to turn out to be a major PITA. What a stupid implementaion of the function.
>>
>>If I write the current time to a file, it writes:
>>
>>File time 10/20/99 08:41:50 AM
>>What I meant to write: 10/20/99 01:41:50 PM
>>
>>This looks like an offest of 5 hours. I am in the central time zone, and there is a Hex entry in my registry called ActiveTimeBias whose value is 300. Am I to assume that this is the number of minutes offset?
>>
>>What a royal PITA.
>>
Erik Moore
Clientelligence