Help LCD clock arduino uno

Hello everybody, have a nice day, i did this project but it goes wrong. i this my code is not correct, i just copied and modified to display on lcd. Help me pls, a newbie :~
this is a simula on proteus:

// Date and time functions using a DS1307 RTC connected via I2C and Wire lib
#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
#include <Wire.h>
#include "RTClib.h"

RTC_DS1307 rtc;

void setup () {
  lcd.begin(16, 2);
  Serial.begin(57600);
#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(__DATE__, __TIME__));
  }
}

void loop () {
    DateTime now = rtc.now();
    
    Serial.print(now.year(), DEC);
    Serial.print('/');
    Serial.print(now.month(), DEC);
    Serial.print('/');
    Serial.print(now.day(), DEC);
    Serial.print(' ');
    Serial.print(now.hour(), DEC);
    Serial.print(':');
    Serial.print(now.minute(), DEC);
    Serial.print(':');
    Serial.print(now.second(), DEC);
    Serial.println();
    
    Serial.print(" since midnight 1/1/1970 = ");
    Serial.print(now.unixtime());
    Serial.print("s = ");
    Serial.print(now.unixtime() / 86400L);
    Serial.println("d");
    
    // calculate a date which is 7 days and 30 seconds into the future
    DateTime future (now.unixtime() + 7 * 86400L + 30);
   
    Serial.print(" now + 7d + 30s: ");
    Serial.print(future.year(), DEC);
    Serial.print('/');
    Serial.print(future.month(), DEC);
    Serial.print('/');
    Serial.print(future.day(), DEC);
    Serial.print(' ');
    Serial.print(future.hour(), DEC);
    Serial.print(':');
    Serial.print(future.minute(), DEC);
    Serial.print(':');
    Serial.print(future.second(), DEC);
    Serial.println();
    
    Serial.println();
    lcd.print(now.hour(), DEC);
    delay(3000);
}

You should test the real thing and tell what it is doing.

In the schematic you have a Arduino Uno and A4 should be SDA, A5 should be SCL.
Did you set the correct time in the DS1307 ?

Caltoa:
You should test the real thing and tell what it is doing.

In the schematic you have a Arduino Uno and A4 should be SDA, A5 should be SCL.
Did you set the correct time in the DS1307 ?

Thank you, when i change SDA and SCL, it worked on simulate.
Now i want to set timer to control led out put, but it didn't output high volt on pin8. Help me pls.

Add this code to control pin8 high since 8pm to 11pm.

int led= 8;
int tnow,ton=20,toff=23;

pinMode(led,OUTPUT);

tnow= (now.hour(), DEC);
if ((tnow>=ton)&&(tnow<toff))
 digitalWrite(led, HIGH);

Use it like this:

tnow = now.hour();

Is 'hour' in 24-hour format ?

yes, i showed tnow on lcd display, that right