I am still trying to figure out the RTC and TimeZone functionality in .NET MF.
I have the UTC from GPS and want to set the RTC for my local time based on the offset for UTC.
Is there any sample code which shows this?
I have looked around, but the new class in 4.0 seems lacking somehow. I mean it should just be a couple lines of code, but what code???
Not sure why you started new thread with same question! We already covered that, we gave all suggestions we have. Look again if you like http://www.tinyclr.com/forum/1/109/
If answers are still not satisfying then please try the Microsoft forum if you like.(Which we already suggested as well!)
Because none of those worked…
Or, MS says they don’t support TimeZone in MF at least that’s what I found.
I could not find a single example that worked for .NET 4.0.
But you mention there is support for RTC in the new firmware version. What is new?
See RealTimeClock class. It is needed to set and clear the hardware clock. This has nothing to do with NETMF software clock or time zones…etc.
If Microsoft say they do not support time zone then that is the end of this! Where did you get this answer that they do not support timezones?
Timezone is supported through TimeService.SetTimeZoneOffset Method | Microsoft Learn
That is Microsoft.SPOT.Time.TimeService.SetTimeZoneOffset(-5*60);//-5 hours
You just had to look in documentation to see it
Please try to search documentation better in future.
Also, where did Microsoft say they do not support timezone?
You said “MS says they don’t support TimeZone in MF at least that’s what I found”
False info can really get everyone confused so please make sure you verify things before posting.
Try your code below:
I get a System.NotSupportedException error when it hits that line of code.
Not sure why it’s available in Microsoft.SPOT.Time if it generates that error message???
Strange! Let me check and will get back to you.
We found why it is throwing the exception. It is fixed in next release.
Thank you for your cooperation.
Is it the next release of .NET MF or your SDK?
Our SDK, in about 2 weeks.