Arduino Clock: Setting Time

thnx a lot!!

always learning ;D

code now looks like:

#include <LiquidCrystal.h>
#include <DateTime.h>

// simple sketch to display a digital clock on an LCD
// see the LiquidCrystal documentation for more info on this

LiquidCrystal lcd(7,8,9,10,11,12);

int ledPin = 13; // LED connected to digital pin 13

void setup(){
//DateTime.sync(1230768000); // set jan 1 2009 as the default time
DateTime.sync(DateTime.makeTime(45, 40, 10, 29, 5, 2010));
lcd.begin(16, 2);
// initialize the digital pin as an output:
pinMode(ledPin, OUTPUT);
}

void loop(){
if(DateTime.available()) {
unsigned long prevtime = DateTime.now();
while( prevtime == DateTime.now() ) // wait for the second to rollover
;
DateTime.available(); //refresh the Date and time properties
digitalClockDisplay( ); // update digital clock

time_t alarmOnTime = (10 * SECS_PER_HOUR) + (41 * SECS_PER_MIN);
time_t alarmOffTime = alarmOnTime + (60 * SECS_PER_MIN);
time_t nextAlarm;

nextAlarm = previousMidnight(DateTime.now())+ alarmOffTime;

if ( DateTime.now() >= alarmOnTime && DateTime.now() < alarmOnTime + alarmOffTime ){
digitalWrite(ledPin, HIGH);
}
else{
digitalWrite(ledPin, LOW);
}
}
}

void printDigits(byte digits){
// utility function for digital clock display: prints preceding colon and leading 0
lcd.print(":");
if(digits < 10)
lcd.print('0');
lcd.print(digits,DEC);
}

void digitalClockDisplay(){
lcd.home();
// digital clock display of current time
lcd.print(DateTime.Hour,DEC);
printDigits(DateTime.Minute);
printDigits(DateTime.Second);
}

but when it hits 10:41:00 nothing happened :-/