TimeSerial library

Good guys .. I want someone to help me with this error sample library you Time (TimeSerial), to compile this error throws me in advance thanks for the help.

TimeSerial.pde: In function 'void setup()':
TimeSerial.pde:18:6: error: redefinition of 'void setup()'
TimeSerial.ino:18:6: error: 'void setup()' previously defined here
TimeSerial.pde: In function 'void loop()':
TimeSerial.pde:24:6: error: redefinition of 'void loop()'
TimeSerial.ino:26:6: error: 'void loop()' previously defined here
TimeSerial.pde: In function 'void digitalClockDisplay()':
TimeSerial.pde:37:6: error: redefinition of 'void digitalClockDisplay()'
TimeSerial.ino:41:6: error: 'void digitalClockDisplay()' previously defined here
TimeSerial.pde: In function 'void printDigits(int)':
TimeSerial.pde:51:6: error: redefinition of 'void printDigits(int)'
TimeSerial.ino:55:6: error: 'void printDigits(int)' previously defined here
TimeSerial.pde: In function 'void processSyncMessage()':
TimeSerial.pde:59:6: error: redefinition of 'void processSyncMessage()'
TimeSerial.ino:64:6: error: 'void processSyncMessage()' previously defined here
TimeSerial.pde: In function 'time_t requestSync()':
TimeSerial.pde:77:8: error: redefinition of 'time_t requestSync()'
TimeSerial.ino:76:8: error: 'time_t requestSync()' previously defined here
TimeSerial.pde:79:29: error: 'BYTE' was not declared in this scope
Error de compilación

If, correct two tabs open.

Delete the .pde file. Only the .ino file should remain.

ok, thanks that was the error

You may use the below code. Then opening serial monitor, you could write to which date you wish to set the date&time. For example:
// T1262347200 //noon Jan 1

You could find today's timestamp from https://www.unixtimestamp.com/ Moreover you have to add "T" at the start of this timestamp and write it through serial after uploading the code.

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

#define TIME_MSG_LEN 11 // time sync to PC is HEADER followed by Unix time_t as ten ASCII digits
#define TIME_HEADER 'T' // Header tag for serial time sync message
#define TIME_REQUEST 7 // ASCII bell character requests a time sync message

// T1262347200 //noon Jan 1 2010

void setup() {
Serial.begin(9600);
}

void loop() {
if (Serial.available() )
{
processSyncMessage();
}
if (timeStatus() == timeNotSet)
Serial.println("waiting for sync message");
else
digitalClockDisplay();
delay(1000);
}

void digitalClockDisplay() {
// digital clock display of the time
Serial.print(hour());
printDigits(minute());
printDigits(second());
Serial.print(" ");
Serial.print(day());
Serial.print(" ");
Serial.print(month());
Serial.print(" ");
Serial.print(year());
Serial.println();
}

void printDigits(int digits) {
// utility function for digital clock display: prints preceding colon and leading 0
Serial.print(":");
if (digits < 10)
Serial.print('0');
Serial.print(digits);
}

void processSyncMessage() {
// if time sync available from serial port, update time and return true
while (Serial.available() >= TIME_MSG_LEN ) { // time message consists of header & 10 ASCII digits
char c = Serial.read() ;
Serial.print(c);
if ( c == TIME_HEADER ) {
time_t pctime = 0;
for (int i = 0; i < TIME_MSG_LEN - 1; i++) {
c = Serial.read();
if ( c >= '0' && c <= '9') {
pctime = (10 * pctime) + (c - '0') ; // convert digits to a number
}
}
setTime(pctime); // Sync Arduino clock to the time received on the serial port
}
}
}