Private Function GetTime() As Date
Dim oXMLHTTP As Object
Set oXMLHTTP = CreateObject("MSXML2.XMLHTTP")
oXMLHTTP.open "HEAD", "http://www.baidu.com", False
oXMLHTTP.send
Dim s As String
s = oXMLHTTP.getResponseHeader("Date")
GetTime = DateAdd("h", 8, CDate(Trim(Split(Split(s, ",")(1), "GMT")(0))))
End Function
Dim oXMLHTTP As Object
Set oXMLHTTP = CreateObject("MSXML2.XMLHTTP")
oXMLHTTP.open "HEAD", "http://www.baidu.com", False
oXMLHTTP.send
Dim s As String
s = oXMLHTTP.getResponseHeader("Date")
GetTime = DateAdd("h", 8, CDate(Trim(Split(Split(s, ",")(1), "GMT")(0))))
End Function