Setting Date and Time for daylight savings

M

Manish Bafna

I am trying to programmatically set the Device Timezone,Date and time using
OpenNETCF Smart Device Framework 2.0 for daylight savings.I was able to
successfully set timezone but not able to set date and time in that zone.
I search high and low on internet but all i could find was code for
OpenNETCF V1.4.That is something like below:
OpenNETCF.Win32.DateTimeEx.SetLocalTime(aDateTime);
OpenNETCF.Win32.DateTimeEx.SetSystemTime(aDateTime.ToUniversalTime());

But what is equivalent of the setlocaltime and setsystemtime in smart device
framework 2.0.I was neither able to get anything
in intellisense in datetimehelper class also.
Any ideas/insights would be highly appreciated.
Thanks in advance for replying(as always)
 
L

Lewis Williams

Try System.Diagnostics.process.Start("ctlpnl.exe", "\Windows\cplmain.cpl,13")

I have used this to launch the standard windows date/time dialog including setting daylight savings.

If you have difficulty, make a date/time shortcut on the device and inspect its contents using wordpad or internet explorer.

A similar syntax can be used to launch a url ;-)



ManishBafn wrote:

Setting Date and Time for daylight savings
13-Jan-08

I am trying to programmatically set the Device Timezone,Date and time using
OpenNETCF Smart Device Framework 2.0 for daylight savings.I was able to
successfully set timezone but not able to set date and time in that zone.
I search high and low on internet but all i could find was code for
OpenNETCF V1.4.That is something like below:
OpenNETCF.Win32.DateTimeEx.SetLocalTime(aDateTime);
OpenNETCF.Win32.DateTimeEx.SetSystemTime(aDateTime.ToUniversalTime());

But what is equivalent of the setlocaltime and setsystemtime in smart device
framework 2.0.I was neither able to get anything
in intellisense in datetimehelper class also.
Any ideas/insights would be highly appreciated.
Thanks in advance for replying(as always)
--
Thanks and Regards.
Manish Bafna.

Previous Posts In This Thread:

On 13 January 2008 09:10
ManishBafn wrote:

Setting Date and Time for daylight savings
I am trying to programmatically set the Device Timezone,Date and time using
OpenNETCF Smart Device Framework 2.0 for daylight savings.I was able to
successfully set timezone but not able to set date and time in that zone.
I search high and low on internet but all i could find was code for
OpenNETCF V1.4.That is something like below:
OpenNETCF.Win32.DateTimeEx.SetLocalTime(aDateTime);
OpenNETCF.Win32.DateTimeEx.SetSystemTime(aDateTime.ToUniversalTime());

But what is equivalent of the setlocaltime and setsystemtime in smart device
framework 2.0.I was neither able to get anything
in intellisense in datetimehelper class also.
Any ideas/insights would be highly appreciated.
Thanks in advance for replying(as always)
--
Thanks and Regards.
Manish Bafna.

On 13 January 2008 12:11
wrote:

Re: Setting Date and Time for daylight savings
OpenNETCF.WindowsCE namespace
DateTimeHelper class
LocalTime and SystemTime properties.


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com



EggHeadCafe - Software Developer Portal of Choice
Microsoft ASP.NET AJAX on Microsoft CDN
http://www.eggheadcafe.com/tutorial...ca-b9d5d1348f25/microsoft-aspnet-ajax-on.aspx
 

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