Or, given that your usage of L'il Atomic CLock confirms that you have an internet connection available and that you "would rather to have 'time control' included in the program", how about this NTPless way of looking up the current local time for your timezone. Do your check against this looked up time rather than against whatever time the PC is set to. The following just needs to be dropped into a bas module:code][blue]Option Explicit
Public Declare Function SystemTimeToTzSpecificLocalTime Lib "kernel32" (lpTimeZoneInformation As TIME_ZONE_INFORMATION, lpUniversalTime As SYSTEMTIME, lpLocalTime As SYSTEMTIME) As Long
Public Declare Function GetTimeZoneInformation Lib "kernel32" (lpTimeZoneInformation As TIME_ZONE_INFORMATION) As Long
Public 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
Public Type TIME_ZONE_INFORMATION
Bias As Long
StandardName(31) As Integer
StandardDate As SYSTEMTIME
StandardBias As Long
DaylightName(31) As Integer
DaylightDate As SYSTEMTIME
DaylightBias As Long
End Type
' NTPless way of getting UTC as a local time. There will be slight inaccuracy
Public Function GetInternetUTC() As Date
Dim wombat As TIME_ZONE_INFORMATION
Dim UTC As SYSTEMTIME
Dim LocalTime As SYSTEMTIME
Dim result As String
Dim dresult As Date
' Get UTC from the US Navy ...
result = Split(Form1.Inet1.OpenURL("
"<BR>")(1)
dresult = Left(Replace(Replace(result, ",", ""), ".", ""), Len(result) - 6)
' Now convert UTC into local time for user's timezone
GetTimeZoneInformation wombat
With UTC
.wHour = CLng(Hour(dresult))
.wMinute = CLng(Minute(dresult))
.wSecond = CLng(Second(dresult))
.wDay = CLng(Day(dresult))
.wMonth = CLng(Month(dresult))
.wYear = CLng(Year(dresult))
End With
SystemTimeToTzSpecificLocalTime wombat, UTC, LocalTime
GetInternetUTC = CDate(LocalTime.wHour & ":" & LocalTime.wMinute & ":" & LocalTime.wSecond & " " & LocalTime.wDay & " " & LocalTime.wMonth & " " & LocalTime.wYear)
End Function[/blue][/code]