S
swc
I have been reading all the posts, and after testing it I am still very
confused.
and my findings seems to be a bit different. and I was wondering if it's the
difference
between different .netcf versions.
(I am running it under the ARM emulator, so maybe that's the difference
also)
I am using a custom build CE 5.0, .NETCF 2.0 with all the QFE upto December
2008.
Here's what I find: as soon as I call pinvoked SetTimeZoneInformation(), the
DateTime.Now's time is actually corrected
according to the new timezone info, but pinvoked GetLocalTime() call's time
did not change.
Also the clock control panel's time did not change, but the timezone changed
to the one
SetTimeZoneInformation() did.
I also find that the .net's TimeZone (function call/property) is the old
time zone until the application is restarted, which
is what all the threads were saying about the DateTime.Now is using the old
timezone.
Now the question is, do I have to set the date and time using SeLocalTime()
with with the difference in the
changed timezone? or is SetTimeZoneInformation suppose to update the time
also.
but if I update the time using SetLocalTime(), the DateTime.Now would also
change making it incorrect.
If I have to call setTimeZoneInformation and setlocaltime that would be
whatever the post is doing and
I can't use the DateTime.Now in my app. and looks like in either case, I
have to replace DateTime.Now with SetLocalTime.
confused.
and my findings seems to be a bit different. and I was wondering if it's the
difference
between different .netcf versions.
(I am running it under the ARM emulator, so maybe that's the difference
also)
I am using a custom build CE 5.0, .NETCF 2.0 with all the QFE upto December
2008.
Here's what I find: as soon as I call pinvoked SetTimeZoneInformation(), the
DateTime.Now's time is actually corrected
according to the new timezone info, but pinvoked GetLocalTime() call's time
did not change.
Also the clock control panel's time did not change, but the timezone changed
to the one
SetTimeZoneInformation() did.
I also find that the .net's TimeZone (function call/property) is the old
time zone until the application is restarted, which
is what all the threads were saying about the DateTime.Now is using the old
timezone.
Now the question is, do I have to set the date and time using SeLocalTime()
with with the difference in the
changed timezone? or is SetTimeZoneInformation suppose to update the time
also.
but if I update the time using SetLocalTime(), the DateTime.Now would also
change making it incorrect.
If I have to call setTimeZoneInformation and setlocaltime that would be
whatever the post is doing and
I can't use the DateTime.Now in my app. and looks like in either case, I
have to replace DateTime.Now with SetLocalTime.