Timezone.CurrentTimeZone

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
 
P

Paul G. Tobey [eMVP]

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.
 
D

Daniel Moth

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top