@@ -320,7 +320,7 @@ void beginLogging()
320
320
{
321
321
sprintf (fileName, " %s_%02d%02d%02d_%02d%02d%02d.ubx" , // SdFat library
322
322
platformFilePrefix,
323
- rtc.getYear () - 2000 , rtc.getMonth (), rtc.getDay (),
323
+ rtc.getYear () - 2000 , rtc.getMonth () + 1 , rtc.getDay (), // ESP32Time returns month:0-11
324
324
rtc.getHour (), rtc.getMinute (), rtc.getSecond ()
325
325
);
326
326
}
@@ -401,16 +401,17 @@ void updateDataFileAccess(SdFile *dataFile)
401
401
{
402
402
if (online.rtc == true )
403
403
{
404
- dataFile->timestamp (T_ACCESS, rtc.getYear (), rtc.getMonth (), rtc.getDay (), rtc.getHour (), rtc.getMinute (), rtc.getSecond ());
405
- dataFile->timestamp (T_WRITE, rtc.getYear (), rtc.getMonth (), rtc.getDay (), rtc.getHour (), rtc.getMinute (), rtc.getSecond ());
404
+ // ESP32Time returns month:0-11
405
+ dataFile->timestamp (T_ACCESS, rtc.getYear (), rtc.getMonth () + 1 , rtc.getDay (), rtc.getHour (), rtc.getMinute (), rtc.getSecond ());
406
+ dataFile->timestamp (T_WRITE, rtc.getYear (), rtc.getMonth () + 1 , rtc.getDay (), rtc.getHour (), rtc.getMinute (), rtc.getSecond ());
406
407
}
407
408
}
408
409
409
410
// Update the file create time with date and time obtained from GNSS
410
411
void updateDataFileCreate (SdFile *dataFile)
411
412
{
412
413
if (online.rtc == true )
413
- dataFile->timestamp (T_CREATE, rtc.getYear (), rtc.getMonth (), rtc.getDay (), rtc.getHour (), rtc.getMinute (), rtc.getSecond ());
414
+ dataFile->timestamp (T_CREATE, rtc.getYear (), rtc.getMonth () + 1 , rtc.getDay (), rtc.getHour (), rtc.getMinute (), rtc.getSecond ()); // ESP32Time returns month:0-11
414
415
}
415
416
416
417
// Finds last log
0 commit comments