diff --git a/src/main.cpp b/src/main.cpp index 4e2771c..8566f8d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -415,8 +415,9 @@ void scribe_sd (){ if ( sem_scribe == true && chrono_scribe >= inter_ecriture ){ //Serial.println("balise scribe"); int vRotMoyen = count*60000/(pptr*chrono_scribe); + DateTime time{rtc.now()}; char timestamp[] = "YY-MM-DD-hh:mm:ss"; - char *horodatage = now.toString(timestamp); + char *horodatage = time.toString(timestamp); char buffer[64]; snprintf(buffer, sizeof buffer, "%d", vRotMoyen); appendFile(SD, fichier, horodatage);