Skip to content

Manually set initial date and time and then update by library #135

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

Closed
basementmedia2 opened this issue Apr 4, 2021 · 1 comment
Closed
Labels
conclusion: duplicate Has already been submitted type: enhancement Proposed improvement

Comments

@basementmedia2
Copy link

Hi,

i'm using your library which is great.
But in my project, it may be the case the the user device has internet connection and maybe NOT has internet connection.

Is something like this possible

if (WiFi.status()==WL_CONNECTED) {
    timeClient.update();
    epochTime = timeClient.getEpochTime();
} else {
    timeClient.setEpochTime(myTimeValueComingFromtheDevice (e.g. mobile phone)); 
}

I know that the function "setEpochTime()" does not exist, but is there a way to manually set the initial date/time which is then refreshed inside the loop?

Best wishes
Daniel

@per1234
Copy link
Contributor

per1234 commented Apr 5, 2021

Hi @basementmedia2. Thanks for taking the time to submit an issue.

I see we already have a prior feature request this at #26.

It's best to have only a single issue per subject so we can consolidate all relevant discussion to one place, so I'll go ahead and close this in favor of the other.

If you end up with additional information to share, feel free to comment in the other thread.

@per1234 per1234 closed this as completed Apr 5, 2021
@per1234 per1234 added conclusion: duplicate Has already been submitted type: enhancement Proposed improvement labels Apr 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: duplicate Has already been submitted type: enhancement Proposed improvement
Projects
None yet
Development

No branches or pull requests

2 participants