lnBias = GetTimeZone('BIAS') && In Util.prg lcBias = iif( lnBias<0, '+', '-' ) lnBias = abs(lnBias) lcBias = lcBias+PadL(Tran(lnBias/60),2,'0')+PadL(Tran(lnBias%60),2,'0') lcRet = LEFT( CDOW(ltDT), 3 )+', '+Str( Day(ltDt), 2 ) + ' ' + LEFT( CMONTH(ltDT), 3); +' '+TRAN( Year(ltDT) )+' '+PadL(Tran(hour(ltDT)),2,'0')+':'; +PadL(Tran(Minute(ltDT)),2,'0')+':'; +PadL(Tran(Sec(ltDT)),2,'0')+' '; +lcBias RETURN FUNCTION GetTimeZone( pcFunc ) * Purpose: Return the Time Zone bias or description * Input: pcFunc = "BIAS" or Missing... return the bias in Minutes * ( GMT = LocalTime? + Bias ) * pcFunc = "NAME" ... Return the time zone name. * Author: William GC Steinford *********************************************************** LOCAL lcTZInfo, lcDesc lcTZInfo = num2dword(0); +repl(chr(0),64)+repl(num2Word(0),8)+num2dword(0); +repl(chr(0),64)+repl(num2Word(0),8)+num2dword(0) DECLARE INTEGER GetTimeZoneInformation IN kernel32.dll; STRING @ lpTimeZoneInformation #DEFINE TIME_ZONE_ID_INVALID 0xFFFFFFFF #DEFINE TIME_ZONE_ID_UNKNOWN 0 #DEFINE TIME_ZONE_ID_STANDARD 1 #DEFINE TIME_ZONE_ID_DAYLIGHT 2 lcRes = GetTimeZoneInformation( @lcTZInfo ) lnBias = Buf2DWord( lcTZInfo ) lcDesc = "Unknown" do case case lcRes=TIME_ZONE_ID_STANDARD lcDesc = substr( lcTZInfo, 3, 64 ) lcDesc = StrConv( lcDesc, 6 ) && 6=Unicode(wide)->DoubleByte lcDesc = strTran( lcDesc, chr(0), '' ) case lcRes=TIME_ZONE_ID_DAYLIGHT lcDesc = substr( lcTZInfo, 3, 64 ) lcDesc = StrConv( lcDesc, 6 ) lcDesc = strTran( lcDesc, chr(0), '' ) endcase if varType(pcFunc)='C' and pcFunc='NAME' RETURN lcDesc endif RETURN lnBias ENDFUNC FUNCTION buf2dword(lcBuffer) RETURN Asc(SUBSTR(lcBuffer, 1,1)) + ; Asc(SUBSTR(lcBuffer, 2,1)) * 256 +; Asc(SUBSTR(lcBuffer, 3,1)) * 65536 +; Asc(SUBSTR(lcBuffer, 4,1)) * 16777216 ENDFUNCI hope someone has solved this problem previously.