     }
   }
 
+  time_t t;
+  get_current_time(&t);
   // assemble first LCD line
-  line1 = "ADC:" + String(adc_key_in);
-  while( line1.length() < 16 ){
-    line1 = line1 + " ";
-  }
+  line1 = format_date(t);
 
   // assemble second LCD line
-  line2 = "bright:" + String(brightness);
+  line2 = format_time(t);
   while( line2.length() < 16){
     line2 = line2 + " ";
   }

//#include <Chronos.h>

/* 
 set up for the RTC
 Libraries used are at
  http://www.pjrc.com/teensy/td_libs_Time.html
  http://www.pjrc.com/teensy/td_libs_DS1307RTC.html

#include <Time.h>
#include <TimeLib.h>

#define UTC_OFFSET -6 * 60 * 60; // ignoring DTV, Central time is UTC-6 hours

// http://www.nist.gov/pml/div688/dst.cfm
bool is_dst(time_t t){
  int M = month(t);
  int D = day(t);
  int wday = weekday(t);
  // do no-math checks first for speed
  if( M > 3 && M < 11 ){
    return true;
  }
  if( M < 3 || M > 11 ){
    return false;
  }
  signed int previousSunday = D - wday;
  // DST starts at 2AM on the second Sunday of March
  if( M == 3 ){
    // Second Sunday would be between the 8th and 15th
    return previousSunday >= 7;
  }
  // DST stops at 2AM on the first Sunday of November
  if( M == 11 ){
    // first Sunday will be between the between the first and the 7th.
    return previousSunday <= 0;
  }
}

String format_time(time_t t){
  int m = minute(t);
  int s = second(t);
  return String(hourFormat12(t)) + ":"
       + (m < 10 ? "0" : "") + String(m) + ":"
       + (s < 10 ? "0" : "") + String(s)
       + " " + (isAM(t) ? "AM" : "PM");
}
String format_date(time_t t){
  return String(month(t)) + "/"
       + String(day(t)  ) + "/"
       + String(year(t) );
}
//time_t get_current_time(time_t* t){
void get_current_time(time_t* t){
  *t = now();
  *t += UTC_OFFSET; //timezone adjustment
  *t += is_dst(*t) ? 60*60 : 0; // add an hour if DST currently applies
  //return t;
}

/*
 Set up for the LCD
