HELP: getting Greenwich Mean Time
?Is there a function or API calls that I can make to get the GMT Time?
?I don't want to hardcode TimeDiff to get GMT. Is there a way to get
?GMT no matter what timezone your workstation is set at? Thanks in
?advance...
==========
Option Explicit
Private Type SYSTEMTIME
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" _
(lpSystemTime As SYSTEMTIME)
Private Declare Function SystemTimeToVariantTime Lib "oleaut32.dll" _
(lpSystemTime As SYSTEMTIME, lpFileTime As Date) As Long
Private Sub Command1_Click()
Dim st As SYSTEMTIME
Dim dt As Date
Call GetSystemTime(st)
Call SystemTimeToVariantTime(st, dt)
Beep
MsgBox "At the tone the time was" & vbCrLf & dt & " GMT"
End Sub
==========
--
Paul Marshall