Chat freely about anything...

User avatar
By Tertius21
#87442 I want to set a specific date and time for the file timestamp with littlefs.

I know this example from the Docs:
Code: Select alltime_t myTimeCallback() {
return 1455451200; // UNIX timestamp
}
void setup () {
LittleFS.setTimeCallback(myTimeCallback);
...
// Any files will now be made with Pris' incept date
}


But i don't understand how can i set a date in myTimeCallback e.g. 12.11.2020 1:11:23

Please can someone help me? Thanks....