settimeofday_cb: distinguish from user or sntp by d-a-v · Pull Request #7637 · esp8266/Arduino

Skip to content

Navigation Menu

Sign in

Appearance settings

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Conversation

@d-a-v

Copy link

Collaborator

@d-a-v d-a-v commented

Oct 6, 2020

edited

Loading

This PR overrides settimeofday_cb() with a new callback signature:

  • currently void myCB () is and remains accepted
  • void myBetterCB (bool from_sntp) is added: from_sntp is true when time is set by SNTP, otherwise it is false.

Consequently:

  • lwip2 is updated with a trivial change
  • NTP_TZ_DST example is also updated to show this new callback

Fixes #7616 @JakubRakus

JakubRakus reacted with hooray emoji

@JakubRakus

Copy link

Tested, works like a charm.

d-a-v reacted with thumbs up emoji
Copy link

Collaborator

@earlephilhower earlephilhower left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@d-a-v d-a-v merged commit 95fb104 into esp8266:master

Oct 23, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@earlephilhower earlephilhower earlephilhower approved these changes

Assignees

No one assigned

Labels

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Setting a callback for SNTP time sync event [feature request]

3 participants

@d-a-v @JakubRakus @earlephilhower