by Karthikeyan (187 Submissions)
Category: Windows API Call/Explanation
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Wed 1st August 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Get Current Greewich Mean Time using GetSystemTime API
API Declarations
wYear As Integer
wMonth As Integer
wDayOfWeek As Integer
wDay As Integer
wHour As Integer
wMinute As Integer
wSecond As Integer
wMilliseconds As Integer
End Type
Private Declare Sub GetSystemTime Lib "kernel32.dll" (lpSystemTime As SYSTEMTIME)
Dim gtime As SYSTEMTIME
GetSystemTime gtime
Label1.Caption = "Time in Greewich is " & gtime.wHour & ":" & gtime.wMinute & ":" & gtime.wSecond
End Sub