Productivity Guide

VBA & Excel Internet Time

Legacy corporate environments often rely on Excel Macros (VBA). This script allows you to query the current internet time to timestamp reports or validate user actions, bypassing the local PC clock.

Implementation example

VB
Sub GetInternetTime()
        Dim http As Object
        Set http = CreateObject("MSXML2.XMLHTTP")

        ' Fetch Time for New York
        http.Open "GET", "https://sunrise.am/developer/api/timezone/America/New_York", False
        http.Send

        If http.Status = 200 Then
            ' Parse manually or display raw string
            MsgBox "API Response: " & http.responseText
        Else
            MsgBox "Error fetching time"
        End If
    End Sub

Why use Sunrise.am for Productivity?

  • Works in Excel, Access, Word
  • No external plugins needed
  • Standard Windows libraries
API Reference View All Guides