time functions such as hourFormat12()

Hey HazardsMind, thanks!
actually I have something going that is similar to your suggestion. Each time the button is pushed a variable increases by one but won't go over 12.

My issue is that I'm not sure how to then insert that value into hourFormat12().

Jimmy60, thank you too!
I was wonder if I would need to convert the entered time into Unix time and then use setTime(pctime). In fact I did try something similar, I did something like:

void processSyncMessage() {
pctime = 1356508790;
setTime(pctime);
...

but for some reason the time in that didn't get into hourFormat12(), so that when it is supposed to go to the LCD nothing happened:


lcd.setCursor(0, 2);
lcd.print("Time: ");

lcd.print(hourFormat12());
printDigits(minute());
printDigits(second());

if (isAM())
{
lcd.print(" AM ");
}
if (isPM())
{
lcd.print(" PM ");
}

lcd.setCursor(0, 3);
lcd.print("Date: ");
lcd.print(day());
lcd.print("/");
lcd.print(month());
lcd.print("/");
lcd.print(year());