R
RDub
I am having a heck of a time setting the Time Zone in my app. I am using VS
2003 with OpenNETCF 1.4 and CF 1.0 on a Symbol MC50 running PPC 2003.
Here is a snip of the code I am using:
Dim tziInfo As New OpenNETCF.Win32.TimeZoneCollection
For Each tziItem As OpenNETCF.Win32.TimeZoneInformation In tziInfo
If tziItem.DisplayName = strTimeZoneDisplayName Then
' Set the TimeZone First
OpenNETCF.Win32.DateTimeEx.SetTimeZoneInformation(tziItem)
' Then Set the Universal Time
OpenNETCF.Win32.DateTimeEx.SetSystemTime(dteUTCDateTime)
Exit For
End If
Next
The code executes without error, however it is not setting the time zone to
the one I expected. For instance If strTimeZoneDisplayName contains "GMT-5
Eastern US" When I inspect the device after this code is run I see the Time
zone is set to "GMT-5 Indiana (USA)". If I select "GMT-6 Central US" I get
"GMT-6 Saskatchewan", and so on. It does however set the time correctly
I am sure that I am doing something wrong here for for the life of me I can
not see it. Can anyone shed some light on this for me? I am about to run
out of hair.
Ron W
2003 with OpenNETCF 1.4 and CF 1.0 on a Symbol MC50 running PPC 2003.
Here is a snip of the code I am using:
Dim tziInfo As New OpenNETCF.Win32.TimeZoneCollection
For Each tziItem As OpenNETCF.Win32.TimeZoneInformation In tziInfo
If tziItem.DisplayName = strTimeZoneDisplayName Then
' Set the TimeZone First
OpenNETCF.Win32.DateTimeEx.SetTimeZoneInformation(tziItem)
' Then Set the Universal Time
OpenNETCF.Win32.DateTimeEx.SetSystemTime(dteUTCDateTime)
Exit For
End If
Next
The code executes without error, however it is not setting the time zone to
the one I expected. For instance If strTimeZoneDisplayName contains "GMT-5
Eastern US" When I inspect the device after this code is run I see the Time
zone is set to "GMT-5 Indiana (USA)". If I select "GMT-6 Central US" I get
"GMT-6 Saskatchewan", and so on. It does however set the time correctly
I am sure that I am doing something wrong here for for the life of me I can
not see it. Can anyone shed some light on this for me? I am about to run
out of hair.
Ron W