I thought we'd get lucky and be able to use Jen's UDF called SerialTime() ... take the current time as a number, than add the GMT bias from registry timezone info :
break on
$BIAS = 0 + readvalue("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation","Bias")
? "GMT=" serialtime(serialtime(@TIME)+($BIAS*60))
exit
function serialtime($strtime)
dim $hours, $minutes, $seconds, $serial, $error
$error
if instr($strtime,':')<instrrev($strtime,':')
if len($strtime)>4 and len($strtime)< 9
$hours=val(left($strtime,instr($strtime,':')-1))
if $hours>23
$error=1
endif
$minutes=val(substr($strtime,instr($strtime,':')+1,instrrev($strtime,':')-instr($strtime,':')-1))
if $minutes>59
$error=1
endif
$seconds=val(right($strtime,len($strtime)-instrrev($strtime,':')))
if $seconds>59
$error=1
endif
$serial=($hours*3600)+($minutes*60)+$seconds
if $serial>86399
$error=1
endif
if $error
$serialtime='-1'
else
$serialtime=$serial
endif
else
$serialtime = '-1'
endif
else
$strtime=val($strtime)
if $strtime<=86399 and $strtime>=0
$hours=$strtime/3600
$strtime=$strtime-($hours*3600)
$hours=right('00'+$hours,2)
$minutes=$strtime/60
$strtime=$strtime-($minutes*60)
$minutes=right('00'+$minutes,2)
$seconds=$strtime
$seconds=right('00'+$seconds,2)
$serialtime=$hours+':'+$minutes+':'+$seconds
else
$serialtime='-1'
endif
endif
endfunction
The problem is that if you add say 22:00:00 hrs + 05:00:00 hours, the function doesn't wrap around to the "next day" so to speak ... it returns a -1. Now if Jens could see his way clear to modify the UDF (if it make sense to do so), that would be cool ... coming out of this with a GMT() UDF would be very nice !
-Shawn