Adjusting DS1307 time in hardware

Dear all.

I would like to know is there any way to set RTC date and time using External hardware.
Below code is working fine for me. I would like to adjust date / time by external hardware. Instead of software.

If any one know suggestion help me out.

#include "Wire.h"
#define DS1307_ADDRESS 0x68
byte zero = 0x00; //workaround for issue #527

void setup(){
  Wire.begin();
  Serial.begin(9600);
  setDateTime(); //MUST CONFIGURE IN FUNCTION
}

void loop(){
  printDate();
  delay(1000);
}

void setDateTime(){

  byte second =      45; //0-59
  byte minute =      41; //0-59
  byte hour =        8; //0-23
  byte weekDay =    2; //1-7
  byte monthDay =    16; //1-31
  byte month =  7; //1-12
  byte year  =       14; //0-99

  Wire.beginTransmission(DS1307_ADDRESS);
  Wire.write(zero); //stop Oscillator

  Wire.write(decToBcd(second));
  Wire.write(decToBcd(minute));
  Wire.write(decToBcd(hour));
  Wire.write(decToBcd(weekDay));
  Wire.write(decToBcd(monthDay));
  Wire.write(decToBcd(month));
  Wire.write(decToBcd(year));

  Wire.write(zero); //start

  Wire.endTransmission();

}

byte decToBcd(byte val){
// Convert normal decimal numbers to binary coded decimal
  return ( (val/10*16) + (val%10) );
}

byte bcdToDec(byte val)  {
// Convert binary coded decimal to normal decimal numbers
  return ( (val/16*10) + (val%16) );
}

void printDate(){

  // Reset the register pointer
  Wire.beginTransmission(DS1307_ADDRESS);
  Wire.write(zero);
  Wire.endTransmission();

  Wire.requestFrom(DS1307_ADDRESS, 7);

   int second = bcdToDec(Wire.read());
  int minute = bcdToDec(Wire.read());
  int hour = bcdToDec(Wire.read() & 0b111111); //24 hour time
  int weekDay = bcdToDec(Wire.read()); //0-6 -> sunday - Saturday
  int monthDay = bcdToDec(Wire.read());
  int month = bcdToDec(Wire.read());
  int year = bcdToDec(Wire.read());

 /*  int second = 11;
  int minute =18;
  int hour = 18;
  int weekDay = 1;
  int monthDay = 2;
  int month = 11;
  int year = 12;
*/
  //print the date EG   3/1/11 23:59:59
  Serial.print(monthDay);
  Serial.print("/");
  
  
  Serial.print(month);
  Serial.print("/");
  
  Serial.print(year);
  Serial.print(" ");
  Serial.print(hour);
  Serial.print(":");
  Serial.print(minute);
  Serial.print(":");
  Serial.println(second);

}

What do you mean 'by hardware'? By another digital device, or by a human? If you need to synchronise the time with another device, you can exchange data using a serial line (i2c, 1wire, serial, etc). If a human is to adjust the time, you need a) some sort of input device like buttons, and b) visual feedback like a display, and c) the code to translate the input into a modified date (add hour, add minute, etc.)

I meant to say . Using selector switch for date and time. if we can use below component How to use in arduino

In theory you can use whatever external hardware you like, as long as you can interface it to the Arduino.

I'm not sure how many connections the rotary switches you referenced use, to encode 0 to 9 for a clock you'd need 4 bits + common. i.e at least 5 per switch.

Do you intend to set the time by having 4 switches in which case you'd need to multiplex the common, because there won't be enough pins on a standard Arduino to do this and have SPI etc