tbpm.ino: In function 'void setup - ERROR WITH TIME

Please anyone have idea how to fix it?

################

ERROR MSG

Arduino: 1.8.3 (Windows 8.1), Placa:"Arduino/Genuino Uno"

C:\Users\daniel\Desktop\COW TRACK\UPWORK_Programador_Adam\TandBPM\tbpm\tbpm.ino: In function 'void setup()':

tbpm:58: error: 'second' was not declared in this scope

filename = second(t)+""+minute(t)+""+hour(t)+""+day(t)+""+month(t)+"_"+year(t)+".txt";

^

tbpm:58: error: 'minute' was not declared in this scope

filename = second(t)+""+minute(t)+""+hour(t)+""+day(t)+""+month(t)+"_"+year(t)+".txt";

^

tbpm:58: error: 'hour' was not declared in this scope

filename = second(t)+""+minute(t)+""+hour(t)+""+day(t)+""+month(t)+"_"+year(t)+".txt";

^

tbpm:58: error: 'day' cannot be used as a function

filename = second(t)+""+minute(t)+""+hour(t)+""+day(t)+""+month(t)+"_"+year(t)+".txt";

^

tbpm:58: error: 'month' cannot be used as a function

filename = second(t)+""+minute(t)+""+hour(t)+""+day(t)+""+month(t)+"_"+year(t)+".txt";

^

tbpm:58: error: 'year' cannot be used as a function

filename = second(t)+""+minute(t)+""+hour(t)+""+day(t)+""+month(t)+"_"+year(t)+".txt";

^

C:\Users\daniel\Desktop\COW TRACK\UPWORK_Programador_Adam\TandBPM\tbpm\tbpm.ino: In function 'void loop()':

tbpm:79: error: 'second' was not declared in this scope

myFile.println(second(t)+""+minute(t)+""+hour(t)+""+day(t)+""+month(t)+"_"+year(t)+","+sensors.getTempCByIndex(0)+","+BPM);

^

tbpm:79: error: 'minute' was not declared in this scope

myFile.println(second(t)+""+minute(t)+""+hour(t)+""+day(t)+""+month(t)+"_"+year(t)+","+sensors.getTempCByIndex(0)+","+BPM);

^

tbpm:79: error: 'hour' was not declared in this scope

Foram encontradas múltiplas bibliotecas para "OneWire.h"
Usado: C:\Users\daniel\Documents\Arduino\libraries\OneWire
Não usado: C:\Users\daniel\Documents\Arduino\libraries\MAX31850_OneWire
myFile.println(second(t)+""+minute(t)+""+hour(t)+""+day(t)+""+month(t)+"_"+year(t)+","+sensors.getTempCByIndex(0)+","+BPM);

Não usado: C:\Users\daniel\Documents\Arduino\libraries\Arduino-Temperature-Control-Library-master
^

Não usado: C:\Program Files (x86)\Arduino\libraries\OneWire
tbpm:79: error: 'day' cannot be used as a function

Não usado: C:\Program Files (x86)\Arduino\libraries\Arduino-Temperature-Control-Library-master
Foram encontradas múltiplas bibliotecas para "DallasTemperature.h"
Usado: C:\Users\daniel\Documents\Arduino\libraries\DallasTemperature
myFile.println(second(t)+""+minute(t)+""+hour(t)+""+day(t)+""+month(t)+"_"+year(t)+","+sensors.getTempCByIndex(0)+","+BPM);

Não usado: C:\Users\daniel\Documents\Arduino\libraries\MAX31850_DallasTemp
^

Não usado: C:\Users\daniel\Documents\Arduino\libraries\Arduino-Temperature-Control-Library-master
tbpm:79: error: 'month' cannot be used as a function

Não usado: C:\Program Files (x86)\Arduino\libraries\Arduino-Temperature-Control-Library-master
myFile.println(second(t)+""+minute(t)+""+hour(t)+""+day(t)+""+month(t)+"_"+year(t)+","+sensors.getTempCByIndex(0)+","+BPM);

^

tbpm:79: error: 'year' cannot be used as a function

myFile.println(second(t)+""+minute(t)+""+hour(t)+""+day(t)+""+month(t)+"_"+year(t)+","+sensors.getTempCByIndex(0)+","+BPM);

^

exit status 1
'second' was not declared in this scope

Este relatório teria mais informações com
"Mostrar a saida detalhada durante a compilação"
opção pode ser ativada em "Arquivo -> Preferências"

########################

programing line:

########################

#define USE_ARDUINO_INTERRUPTS true // Set-up low-level interrupts for most acurate BPM math.
#define ONE_WIRE_BUS 2 //Temp data is plugged into analog 2 pin
#define LED13 13

//Include appropriate librairies
#include <SPI.h>
#include <SD.h>
#include <PulseSensorPlayground.h>
#include <OneWire.h>
#include <DallasTemperature.h>
#include <DS3231.h>

OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);

DS3231 rtc(SDA, SCL);
Time t;

const int PulseWire = 0; // PulseSensor PURPLE WIRE connected to ANALOG PIN 0
int Threshold = 550;

File myFile;

PulseSensorPlayground pulseSensor; // Creates an instance of the PulseSensorPlayground object called "pulseSensor"

String date;
String filename;

int seconds,minutes,hours,day,month,year;

void setup()
{
//Start RTC object
rtc.begin();

//Setup pulse sensor:
pulseSensor.analogInput(PulseWire);
pulseSensor.blinkOnPulse(LED13);
pulseSensor.setThreshold(Threshold);

if (pulseSensor.begin()) {
//pulseSensor object initialised

//Setup temperature sensor
sensors.begin();

//Need to sync time
t = rtc.getTime();

//Setup SD card

SD.begin(4);

//Create file with current date and time
date; //= need to ask about format (mm/dd/yy vs dd/mm/yy)
filename = second(t)+""+minute(t)+""+hour(t)+""+day(t)+""+month(t)+"_"+year(t)+".txt";
myFile = SD.open(filename, FILE_WRITE);
myFile.close();
}

}

void loop()
{
//Get temperature reading:
sensors.requestTemperatures();
//Get BPM:
int BPM = pulseSensor.getBeatsPerMinute();

if (pulseSensor.sawStartOfBeat()) {
//Save everything to file
t = rtc.getTime();
myFile = SD.open(filename, FILE_WRITE);
//Write data in format: time,temperature,bpm\n
myFile.println(second(t)+""+minute(t)+""+hour(t)+""+day(t)+""+month(t)+"_"+year(t)+","+sensors.getTempCByIndex(0)+","+BPM);
myFile.close();
}
}

Please use code tags (</> button on the toolbar) when you post code or warning/error messages. The reason is that the forum software can interpret parts of your code as markup, leading to confusion, wasted time, and a reduced chance for you to get help with your problem. This will also make it easier to read your code and to copy it to the IDE or editor. If your browser doesn't show the posting toolbar then you can just manually add the code tags:
[code]``[color=blue]// your code is here[/color]``[/code]
Using code tags and other important information is explained in the How to use this forum post. Please read it.

Please always do a Tools > Auto Format on your code before posting it. This will make it easier for you to spot bugs and make it easier for us to read. If you're using the Arduino Web Editor you will not have access to this useful tool but it's still unacceptable to post poorly formatted code. I recommend you to use the standard IDE instead.

Please remove unnecessary blank lines from your code before posting to the forum. One or two to separate code into logical sections is fine but large spaces for no reason or random blank lines just make for more scrolling when we're trying to read your code.

Post a link to where you got the libraries and sketch from. Please use the chain links icon on the toolbar to make it clickable. Or if you installed it using Library Manger (Sketch > Include Library > Manage Libraries) then say so and state the full name of the library.

Looks like this sketch is expecting a different DS3231 library. You may have to re-write the sketch if the matching library can't be determined.