Sub GetRTCTime
'The current time must be defined in the sub. The global can not be used.
Dim currenttime As DSTime = ds1302.GetTime
Log("RTC Time ", _
NumberFormat(currenttime.years,4,0), " ", NumberFormat(currenttime.months,2,0), "-", NumberFormat(currenttime.dayofmonth,2,0), _
" ", _
NumberFormat(currenttime.hours,2,0), ":", NumberFormat(currenttime.minutes,2,0), ":", NumberFormat(currenttime.seconds,2,0), _
" ", _
DayOfWeekArr(currenttime.dayofweek))
End Sub