The time from my server is a php script that returns this:
Code: Select all
<?PHP
echo strtotime(date('Y-m-d H:i:s'));
?>
Code: Select all
struct timeval tv;
tv.tv_sec = atol(receivedTime);
settimeofday(&tv, NULL);
The only problem is that the EPS has 1 hour and 43 minutes time difference than the current time.
PHP shows the right time but the EPS converts it "wrong" to display the correct time.
To show the time, i use this code:
Code: Select all
struct tm timeinfo;
if(!getLocalTime(&timeinfo)){
Serial.println("Failed to obtain time");
return;
}
Serial.println(&timeinfo, "%A, %B %d %Y %H:%M:%S");
What am i doing wrong here?