Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

isTimeSet() does not reset when update fail #175

Open
MGMehdi opened this issue Jul 27, 2022 · 1 comment
Open

isTimeSet() does not reset when update fail #175

MGMehdi opened this issue Jul 27, 2022 · 1 comment
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@MGMehdi
Copy link

MGMehdi commented Jul 27, 2022

Hello

When I check if the Arduino success to update the date, if I disconnect the cable, isTimeSet() does not return false

void loop(){
    timeClient.update();
    if (timeClient.isTimeSet())
    {
        Serial.println("Updated");
    }
    else
    {
        Serial.println("Not updated");
    }
}
@per1234 per1234 added type: imperfection Perceived defect in any part of project topic: code Related to content of the project itself labels Jul 27, 2022
@MGMehdi
Copy link
Author

MGMehdi commented Jul 27, 2022

The same occur if I do this

void loop(){
    if (timeClient.update())
    {
        Serial.println("Updated");
    }
    else
    {
        Serial.println("Not updated");
    }
}

Or use forceUpdate()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

No branches or pull requests

2 participants