debounce and RTC clock not working together in one program, Please Help!

debounce and RTC clock not working together in one program, Please Help!
when i remove RTC program then debounce switch works fine, But when i add the RTC program in it, Like i did in the uploaded sketch of mine, debounce switch stops working only rtc works. Hope you understand what im trying to say.

My sketch
//----------------------------------------------------------------------------------
const int buttonPin = A2; // the number of the pushbutton pin
const int ledPin = 6; // the number of the LED pin
const int button1Pin = A1; // the number of the pushbutton pin
const int led1Pin = 7; // the number of the LED pin
int ledState = HIGH; // the current state of the output pin
int buttonState; // the current reading from the input pin
int lastButtonState = LOW; // the previous reading from the input pin
int led1State = LOW; // the current state of the output pin
int button1State; // the current reading from the input pin
int lastButton1State = HIGH; // the previous reading from the input pin
// the following variables are long's because the time, measured in miliseconds,
// will quickly become a bigger number than can be stored in an int.
long lastDebounceTime = 2; // the last time the output pin was toggled
long debounceDelay = 50; // the debounce time; increase if the output flickers
long lastDebounce1Time = 2; // the last time the output pin was toggled
long debounce1Delay = 50;
//------------------------------------LCD----------------------------------------=-
#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
//--------------------------------TEMPRATURE---------------------------------------
float temp;
int tempPin = A0;
//------------------------------------RTC------------------------------------------
String readString;
#include <Wire.h>
#include "RTClib.h"

RTC_DS1307 rtc;
void setup()
{
//----------------------------------RTC-------------------------------------------
#ifdef AVR
Wire.begin();
#else
Wire1.begin(); // Shield I2C pins connect to alt I2C bus on Arduino Due
#endif
rtc.begin();

if (! rtc.isrunning()) {
Serial.println("RTC is NOT running!");
// following line sets the RTC to the date & time this sketch was compiled
rtc.adjust(DateTime(F(DATE), F(TIME)));
// This line sets the RTC with an explicit date & time, for example to set
// January 21, 2014 at 3am you would call:
// rtc.adjust(DateTime(2014, 1, 21, 3, 0, 0));
}
//-------------------------------------------------------------------------------
pinMode(buttonPin, INPUT);
pinMode(ledPin, OUTPUT);
pinMode(button1Pin, INPUT);
pinMode(led1Pin, OUTPUT);

// set initial LED state
digitalWrite(ledPin, ledState);
digitalWrite(led1Pin, led1State);
//-----------------------------------------------------------------------------
Serial.begin(9600);

lcd.begin(16, 2);
// Print a message to the LCD.--------------------------------------------------
lcd.setCursor(5,0);
lcd.print("WELCOME!");
delay(1000);
for (int positionCounter = 0; positionCounter < 5; positionCounter++) {
// scroll one position left:
lcd.scrollDisplayLeft();
// wait a bit:
delay(200);}
for (int positionCounter = 0; positionCounter < 8; positionCounter++) {
// scroll one position right:
lcd.scrollDisplayRight();
// wait a bit:
delay(200);}
for (int positionCounter = 0; positionCounter < 4; positionCounter++) {
// scroll one position left:
lcd.scrollDisplayLeft();
// wait a bit:
delay(200);}
delay(1000);
//--------------------------------------------------------------------------------
lcd.clear();
lcd.setCursor(0,0);
lcd.print(" Initializing ");
lcd.setCursor(0,1);
lcd.print(" Sensors ");

delay(1000);
//--------------------------------PIN CONFIG------------------------------------------
pinMode(6,OUTPUT);
pinMode(7,OUTPUT);
pinMode(8,OUTPUT);
pinMode(9,OUTPUT);
pinMode(13,INPUT);

//----------------------------------TEMP-----------------------------------------
temp = analogRead(tempPin);
temp = temp * 0.419922;

//---------------------------------------------------------------
lcd.clear();

lcd.print("ROOM TEMPERATURE");
lcd.setCursor(5,1);
lcd.print(temp);
lcd.print("*C");
delay(2500);
lcd.clear();
//--------------------------------------------------------------
}

void loop() {
//---------------------------------------------------------------------------------
{int reading = digitalRead(buttonPin);

// check to see if you just pressed the button
// (i.e. the input went from LOW to HIGH), and you've waited
// long enough since the last press to ignore any noise:

// If the switch changed, due to noise or pressing:
if (reading != lastButtonState) {
// reset the debouncing timer
lastDebounceTime = millis();
}

if ((millis() - lastDebounceTime) > debounceDelay) {
// whatever the reading is at, it's been there for longer
// than the debounce delay, so take it as the actual current state:

// if the button state has changed:
if (reading != buttonState) {
buttonState = reading;

// only toggle the LED if the new button state is HIGH
if (buttonState == HIGH) {
ledState = !ledState;
}

if (digitalRead(6) == LOW)
{
lcd.clear();
lcd.setCursor(0,1);
lcd.print("Backlight ON!");
delay(200);
lcd.clear();

}
if (digitalRead(6) == HIGH)
{
lcd.clear();
lcd.setCursor(0,1);
lcd.print("Backlight OFF!");
delay(200);
lcd.clear();
}
}
}

// set the LED:
digitalWrite(ledPin, ledState);

// save the reading. Next time through the loop,
// it'll be the lastButtonState:
lastButtonState = reading;}
//--------------------------------------------------------------
{int reading = digitalRead(button1Pin);

// check to see if you just pressed the button
// (i.e. the input went from LOW to HIGH), and you've waited
// long enough since the last press to ignore any noise:

// If the switch changed, due to noise or pressing:
if (reading != lastButton1State) {
// reset the debouncing timer
lastDebounce1Time = millis();
}

if ((millis() - lastDebounce1Time) > debounce1Delay) {
// whatever the reading is at, it's been there for longer
// than the debounce delay, so take it as the actual current state:

// if the button state has changed:
if (reading != button1State) {
button1State = reading;

// only toggle the LED if the new button state is HIGH
if (button1State == HIGH) {
led1State = !led1State;
}
if (digitalRead(7) == LOW)
{
lcd.clear();
lcd.setCursor(0,1);
lcd.print("Light ON!");
delay(200);
lcd.clear();

}
if (digitalRead(7) == HIGH)
{
lcd.clear();
lcd.setCursor(0,1);
lcd.print("Light OFF!");
delay(200);
lcd.clear();
}
}

}

// set the LED:
digitalWrite(led1Pin, led1State);
lastButton1State = reading;}

//-----------------------------------------------------------------------------------
lcd.clear();
DateTime now = rtc.now();

lcd.print(now.hour(), DEC);
lcd.print(':');
lcd.print(now.minute(), DEC);
lcd.print(':');
lcd.print(now.second(), DEC);
lcd.println();

//----------------------------------------------------------------------------------

}

{int reading = digitalRead(buttonPin);

What is that curly brace for? Why are you not indenting your code properly, or using Tools + Auto Format? Why did you not read the stickies at the top of the forum? Why did you not post your code properly?

That is the crappiest debouncing code around. A switch is either pressed or not. It does not take three variables to determine if a state change happened, and if that change happened too close to another change.

Regardless of whether a switch was pressed, or not, you clear the LCD and print the time. Exactly how long does that take? Are your switches still bouncing after that happens? If so, you need to throw them away and spend more than a nickel apiece for replacements.

How ARE the switches wired? Is debouncing what you really need, or is the debouncing really an attempt to stop a floating pin condition?