Calculating world time shifts
How about:
Function gmt() As Date
Application.Volatile
dot = "."
Set Serve = GetObject("winmgmts:\\" & dot & "\root\cimv2")
Set Zones = Serve.ExecQuery("Select * From Win32_TimeZone")
For Each Zone In Zones
intTimeZoneBias = Zone.Bias
intDayLightBias = Zone.DaylightBias
Next
gmt = Now() - (intTimeZoneBias - intDayLightBias) / (60 * 24)
End Function
I think from Pearson ? It should give true GMT whatever local time is.
--
Gary''s Student - gsnu2007
"Bill Ridgeway" wrote:
I would like a formula to return GMT for places around the world. Obviously
some places will be in advance of GMT and some behind GMT. The difficulty I
have found is in dealing with time that go either into the previous or
following day.
Any help please?
Thanks.
Bill Ridgeway
|