I tried to sync time from Particle cloud in fully manual system mode but I am getting wrong data and time as 01-01-2000. I attached my sample code below. Kindly suggest the correct and efficient way
SYSTEM_MODE(MANUAL);
SerialLogHandler logHandler(LOG_LEVEL_TRACE);
void setup() {
(void)logHandler; // Does nothing, just to eliminate warning for unused variable
Particle.connect();
Particle.syncTime();
waitUntil(Particle.syncTimeDone);
Particle.disconnect();
}
void loop() {
time_t time = Time.now();
Log.info("Time is: %d", (int) time);
Serial.println(Time.format(time, TIME_FORMAT_ISO8601_FULL));
delay(7000);
}