Timezone.CurrentTimeZone

  • Thread starter Thread starter Daniel Moth
  • Start date Start date
D

Daniel Moth

Hi

System.NotSupportedException in mscorlib.dll is thrown(!) when I try to
access any property (DaylightName or StandardName) of
System.Timezone.CurrentTimeZone. The function calls on the object work
fine...

This occurs both on our own CE 4.2 and the emulator. I tried calling
GetTimeZoneInformation from a eVC app and it worked fine... Also my .NET
code works on the desktop ok... Tried on a PocketPC emulator same bad
result... The help shows the properties as supported on CF...

Am I missing something obvious?

Cheers
Daniel
 
It's *really* easy to add, it just takes a ref TIME_ZONE_INFORMATION
parameter and returns one of three uint values: 0 if it fails, 1 if we are
currently on standard time, and 2 if we are currently on daylight time. I'm
working on adding it to OpenNETCF, but may not have it for a little while as
my build system is broken.

Paul T.
 
I have tried that... I also get a NotSupportedException... Have you tried
Timezone.CurrentTimeZone.StandardName? Is it supposed to throw an exception
when all the other function calls succeed? [good luck with your build
system]

Cheers
Daniel
 
Back
Top