|
@echo off
if exist %tmp%\getTime.vbs (
del %tmp%\getTime.vbs
)
(
echo Set t = CreateObject(“Microsoft.XMLHTTP”^)
echo t.open “GET”, “http://su.baidu.com/cdn-cgi/trace/”, false
echo t.send(^)
echo s = Split(t.responseText,chr(10^)^)(3^)
echo s = right(s,len(s^)-3^)
echo s = DateAdd(“s”,s,”1970-01-01 00:00:00″^)
echo s = DateAdd(“h”,8,s^)
echo wsh.Echo s
)>%tmp%\getTime.vbs
for /f “tokens=1*” %%i in (‘cscript /nologo %tmp%\getTime.vbs’) do del %tmp%\getTime.vbs & date %%i & time %%j |
|