Main Site Documentation

G120HDR 'System.ArgumentOutOfRangeException' on RealTimeClock


#1

After updating my som modules to 4.2.9.10 and updating the references in my main code i get this error:

#### Exception System.ArgumentOutOfRangeException - CLR_E_OUT_OF_RANGE (2) ####
#### Message: 
#### System.DateTime::.ctor [IP: 0000] ####
#### GHI.Premium.Hardware.RealTimeClock::GetTime [IP: 001e] ####
#### IrcApplication.Program::.cctor [IP: 013c] ####

A first chance exception of type ‘System.ArgumentOutOfRangeException’ occurred in mscorlib.dll

on this line:

static DateTime RealDateTime = GHI.Premium.Hardware.RealTimeClock.GetTime(); 

If i look in the object browser then nothing seems to be changed.

public static System.DateTime GetTime()
Member of GHI.Premium.Hardware.RealTimeClock

Summary:
Gets RTC.

Returns:
Date and time.

Anny thoughts?


#2

Did you set the clock first?

check this thread:

http://www.tinyclr.com/forum/topic?id=1285


#3

OFFCOURCE not… Thank god its Friday…


#4

TGIF indeed! :smiley: