From 7d2ceedc9aefa9f7c242bce04dcb7e58ca90c0d6 Mon Sep 17 00:00:00 2001 From: anschrammh Date: Sun, 13 Dec 2020 21:14:19 +0100 Subject: [PATCH] Adjusted the file date and time format --- src/app/FTPServer.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/FTPServer.h b/src/app/FTPServer.h index 7515064..a4a96dd 100644 --- a/src/app/FTPServer.h +++ b/src/app/FTPServer.h @@ -856,9 +856,9 @@ class FTPServer : public TCPServer client->_dataClient.printf("%crwxrwxrwx 1 owner esp8266 %d %s %s %s:%s %s\r\n", fileOrDir.isDirectory() ? 'd' : '-', fileOrDir.isDirectory() ? 0 : fileOrDir.size(), - monthNumTo3LetterAbbreviation(month, timeP->tm_mon), + monthNumTo3LetterAbbreviation(month, timeP->tm_mon + 1), //+1 because in the tm struct, month goes from 0 to 11 ... dateTimeFormater(zero_prepended[0],timeP->tm_mday,'0'), - dateTimeFormater(zero_prepended[1],timeP->tm_hour,'0'), + dateTimeFormater(zero_prepended[1],!timeP->tm_hour ? 23 : timeP->tm_hour-1 ,'0'), dateTimeFormater(zero_prepended[2],timeP->tm_min,'0'), fileOrDir.name());