flobadob
flobadob

Reputation: 2872

TimeZoneInfo.Local on XP

I have code like this which runs fine on windows 7...

TimeZoneInfo _timeZoneInfo = TimeZoneInfo.Local;

It doesn't work on XP SP3. The error given is...

A first chance exception of type 'System.EntryPointNotFoundException' occurred in System.Core.dll

Additional information: Unable to find an entry point named 'GetDynamicTimeZoneInformation' in DLL 'kernel32.dll'.

Looking at the help for the function GetDynamicTimeZoneInformation I see that it's only available on vista+

Any ideas?

Upvotes: 1

Views: 710

Answers (1)

Russ Clarke
Russ Clarke

Reputation: 17909

If its not in XP, then you're not going to be able to use it, and sadly it's not just a case of copying a DLL over from a different box.

Can you use this method of getting the TimeZone ? MSDN says its supported in XPSP3 and higher:

TimeZone localZone = TimeZone.CurrentTimeZone;

Upvotes: 1

Related Questions