I think I have the RTS sorted and its reporting the correct date and time each time I check it. I'm now trying to create a CSV file in the SD card and want to set the date and time for the created file. In SdFile.cpp>>>
This is why i tried the "file.timestamp(T_CREATE,rtcyear,rtcmonth,rtcday,rtchour,rtcminute,rtcsecond);"
Any guidance would be great as to why it's not setting the date and time.
Thanks Ryan
Code:
uint8_t SdFile::timestamp(uint8_t flags, uint16_t year, uint8_t month,
uint8_t day, uint8_t hour, uint8_t minute, uint8_t second) {
This is why i tried the "file.timestamp(T_CREATE,rtcyear,rtcmonth,rtcday,rtchour,rtcminute,rtcsecond);"
Code:
void doDTS(){
rtcyear = year();
rtcmonth = month();
rtcday = day();
rtchour = hour();
rtcminute = minute();
rtcsecond = second();
}
if (!file.open(fileName, O_CREAT | O_WRITE | O_EXCL)) {
doDTS();
file.timestamp(T_CREATE,rtcyear,rtcmonth,rtcday,rtchour,rtcminute,rtcsecond);
}
Any guidance would be great as to why it's not setting the date and time.
Thanks Ryan