Behind these pins lies the DS1302 chip, a 32.768 kHz crystal, and a small battery (usually a CR2032). This battery keeps the clock running when the main Arduino power is off.
// Comment this line out after the first upload to avoid resetting time myRTC.setDS1302Time( // Update library variables with current RTC time myRTC.updateTime(); // Print current time Serial.print(myRTC.dayofmonth); Serial.print( ); Serial.print(myRTC.month); Serial.print( ); Serial.print(myRTC.year); Serial.print( ); Serial.print(myRTC.hours); Serial.print( ); Serial.print(myRTC.minutes); Serial.print( ); Serial.println(myRTC.seconds);