PC Review Forums Newsgroups Microsoft DotNet Microsoft Dot NET Compact Framework Is there any equivalent of TimeZoneInfo.SupportsDaylightSavingTime incompact framework

Reply

Is there any equivalent of TimeZoneInfo.SupportsDaylightSavingTime incompact framework

 
Thread Tools Rate Thread
Old 15-04-2008, 10:00 PM   #1
Jayesh
Guest
 
Posts: n/a
Default Is there any equivalent of TimeZoneInfo.SupportsDaylightSavingTime incompact framework


Hi,

I am using Win CE 4.2 with .NET CF 3.5.

I need to know if my current time zone support Daylight Saving
time. .NET 3.5 full framework has
TimezoneInfo.SupportsDaylightSavingTime which is not available in
Compact Framework.

I have a form in my application where user sets date & time. I am
pinvoking to SetLocalTime.
When ever AutoDST (Automatically adjust clock for daylight saving)
check box is not checked under control panel Date/Time,
Sytem.DateTime.Now is off by 1 hours while staying DST start/stop date
which is expected behavior.

I can set AutoDST check using setting registry key but every Timezone
does not observes DST so I can't use this solution generically.

If I know that the current time zone is observing DST and new date is
in range of DST Start/Stop date, I can add 1 hour.
Any help would be appreciated.

Thanks,
Jayesh Modha
  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off