I'm testing a simple clock with alarm output, based on this post discussing timealarms http://arduino.cc/forum/index.php/topic,37693.0.html
My question is, when the sketch is uploaded with the current time, the time displayed is not what is hard coded. For example, using
results in the correct time, but the date is displayed as 04/06/2014. Earlier today in the 7 AM hour, the month was 5 and year was 2015.
I do get my expected alarm output at the set time.
//This sketch triggers a daily alarm output
void setup() // the setTime results in 8:56:00 4/06/2014
setTime(8,56,0,3,22,13); // set time to 8:56:00 am Mar 22 2013
// create the alarms
Alarm.alarmRepeat(8,45,0, MorningAlarm); // every morning
Alarm.delay(1000); // wait one second between clock display
// functions to be called when an alarm triggers:
digitalWrite(13, HIGH); //alarm test output
sprintf(buf, "%02d:%02d:%02d %02d/%02d/%4d", hour(), minute(), second(), month(), day(), year());
Any suggestions appreciated.