Brian W said:
Have a look at the TimeZone class
HTH
Brian W
Brian, thanks but I have already looked there, but it seems that you
can only "Get" the current time zone...there is no way that I cna see
with that class to calculate a GMT time to a time in a time zone that
is not the local time of the computer it is on. But you can convert
the GMT tome with TimeZone to Local time, and that would work if the
users computers were in California, but they are not.
I did come up wit the following fuction but feel that Windows "should"
have a way to do it.
Public Shared Function UTCToPacificTime(ByVal UTC As DateTime)
As DateTime
Dim PacTime As DateTime
Dim StandardTime As Boolean = True
If (UTC.AddHours(-8).Month > 10 AndAlso
UTC.AddHours(-8).Month < 3) Then
StandardTime = False
End If
If ((UTC.AddHours(-8).DayOfWeek = DayOfWeek.Sunday)
AndAlso (UTC.AddHours(-8).Day > 24)) Then
If (UTC.AddHours(-8).Month = 10) AndAlso
(UTC.AddHours(-8).Hour > 2) Then
StandardTime = False
ElseIf (UTC.AddHours(-8).Month = 3) AndAlso
(UTC.AddHours(-8).Hour < 2) Then
StandardTime = False
End If
End If
If (StandardTime) Then
PacTime = UTC.AddHours(-8)
Else
PacTime = UTC.AddHours(-7)
End If
Return PacTime
End Function
Ed,