Option Explicit
Sub Get_Time_From_Internet()
Debug.Print InternetTime()
End Sub
Function InternetTime(Optional GMTDifference As Integer) As Date
    Dim Request     As Object
    Dim ServerURL   As String
    Dim Results     As String
    Dim NetDate     As String
    Dim NetTime     As Date
    Dim LocalDate   As Date
    Dim LocalTime   As Date
    If GMTDifference < -12 Or GMTDifference > 14 Then
        Exit Function
    End If
    ServerURL = "http://www.timeanddate.com/worldclock/fullscreen.html?n=100"
    'https://www.timeanddate.com/worldclock/india/mumbai
    On Error Resume Next
    Set Request = CreateObject("MSXML2.ServerXMLHTTP.6.0")
    If Err.Number <> 0 Then
        Exit Function
    End If
    On Error GoTo 0
    Request.Open "GET", ServerURL, False, "", ""
    Request.send
    If Request.readyState = 4 Then
        Results = Request.getResponseHeader("date")
        Results = Mid(Results, 6, Len(Results) - 9)
        NetDate = Left(Results, Len(Results) - 9) '30 Sep 2013
        NetTime = Right(Results, 8) '18:33:23
        LocalDate = ConvertDate(NetDate)
        LocalTime = NetTime + GMTDifference / 24
        InternetTime = LocalDate + LocalTime
    End If
    Set Request = Nothing
End Function
Function ConvertDate(strDate As String) As Date
    Dim MyMonth As Integer
    Select Case UCase(Mid(strDate, 4, 3))
        Case "JAN": MyMonth = 1
        Case "FEB": MyMonth = 2
        Case "MAR": MyMonth = 3
        Case "APR": MyMonth = 4
        Case "MAY": MyMonth = 5
        Case "JUN": MyMonth = 6
        Case "JUL": MyMonth = 7
        Case "AUG": MyMonth = 8
        Case "SEP": MyMonth = 9
        Case "OCT": MyMonth = 10
        Case "NOV": MyMonth = 11
        Case "DEC": MyMonth = 12
    End Select
    ConvertDate = DateValue(Right(strDate, 4) & "/" & MyMonth & "/" & Left(strDate, 2))
End Function