Cerbuino: Broken RTC code?

I think I found some broken code in the GHI.OSHW.Hardware project: Getting the RTC time on my Cerbuino caused some exceptions. After some debugging I change some code in the OSHW hardware and now reading the RTC is fine:

  
        private static DateTime GetTimeCerb()
        {
            Cerb.RTC_GetTime();
            Cerb.RTC_GetDate();
            
            // The following line in the commet contains a bug that might throw an argument exception:
            // return new DateTime((Cerb.RTC_Year + 1980), Cerb.RTC_Month, Cerb.RTC_WeekDay, Cerb.RTC_Hours, Cerb.RTC_Minutes, Cerb.RTC_Seconds, Cerb.RTC_H12);
            // It has been replaced by:
            return new DateTime(Cerb.RTC_Year + 1980, Cerb.RTC_Month, Cerb.RTC_Date, Cerb.RTC_Hours, Cerb.RTC_Minutes, Cerb.RTC_Seconds );
        }

Can somebody review my change and give some advise if the change is correct how to propagate this into the next version of GHI.OSHW.Hardware library?

Looks like DateTime constructor doesn’t like one or both of these: Cerb.RTC_WeekDay, Cerb.RTC_H12. And with that constructor these have to represent day and milliseconds.

We have seen an issue with the RTC on the Cerb-Family a few weeks back in another post regarding the get time functions returning the incorrect date. We will be fixing this/these issues in a future SDK release.

I pointed out the same bug over a month ago. Nice to see it will be fixed in a future release…

http://www.tinyclr.com/forum/topic?id=8862&page=3#msg88435