You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using this library resulted in wrong file time stamps, 1970 style.
So, I made a change:
#include <coredecls.h> // Needed for setting the right system time
void setTime(time_t t) {
#ifdef TIME_DRIFT_INFO
if(sysUnsyncedTime == 0)
sysUnsyncedTime = t; // store the time of the first call to set a valid Time
#endif
sysTime = (uint32_t)t;
nextSyncTime = (uint32_t)t + syncInterval;
Status = timeSet;
prevMillis = millis(); // restart counting from now (thanks to Korman for this fix) tune_timeshift64((uint64_t)sysTime * 1000000ULL); // Take over the new time into the system time
}
The text was updated successfully, but these errors were encountered:
Using this library resulted in wrong file time stamps, 1970 style.
So, I made a change:
#include <coredecls.h> // Needed for setting the right system time
void setTime(time_t t) {
#ifdef TIME_DRIFT_INFO
if(sysUnsyncedTime == 0)
sysUnsyncedTime = t; // store the time of the first call to set a valid Time
#endif
sysTime = (uint32_t)t;
nextSyncTime = (uint32_t)t + syncInterval;
Status = timeSet;
prevMillis = millis(); // restart counting from now (thanks to Korman for this fix)
tune_timeshift64((uint64_t)sysTime * 1000000ULL); // Take over the new time into the system time
}
The text was updated successfully, but these errors were encountered: