Hi. I have used the following code to get GMT from the net, but that isn't quite what I need.
I need the time including any daylight saving time, ie exactly as it is when you are in the UK and looking at your watch (we are on GMT until late April, then DST kicks in until October).
I'm pretty sure the solution is simple, but can anyone show me please?
Sub Get_Current_Time
Dim Timezone As Double
Timezone = DateTime.GetTimeZoneOffsetAt(DateTime.Now)
DateTime.SetTimeZone(0)
sntp.NtpServerName = "0.uk.pool.ntp.org"
sntp.TimeOut = 10000
ticks = sntp.getGmtNtpTime
DateTime.SetTimeZone(Timezone)
End Sub
Thank you
I need the time including any daylight saving time, ie exactly as it is when you are in the UK and looking at your watch (we are on GMT until late April, then DST kicks in until October).
I'm pretty sure the solution is simple, but can anyone show me please?
Sub Get_Current_Time
Dim Timezone As Double
Timezone = DateTime.GetTimeZoneOffsetAt(DateTime.Now)
DateTime.SetTimeZone(0)
sntp.NtpServerName = "0.uk.pool.ntp.org"
sntp.TimeOut = 10000
ticks = sntp.getGmtNtpTime
DateTime.SetTimeZone(Timezone)
End Sub
Thank you