Skip to content

Added processing of fractional time, setting of currentEpoch, sanity checking of received timestamps, and new example.#148

Open
afdp777 wants to merge 3 commits into
arduino-libraries:masterfrom
afdp777:master
Open

Added processing of fractional time, setting of currentEpoch, sanity checking of received timestamps, and new example.#148
afdp777 wants to merge 3 commits into
arduino-libraries:masterfrom
afdp777:master

Conversation

@afdp777

@afdp777 afdp777 commented Jun 9, 2021

Copy link
Copy Markdown

Hello! I humbly present my contribution to the NTPClient library.
I've tried not to change much of the way the library works and aimed to improve on it instead.
Here are the changes that I made:

Added processing of fractional time in forceUpdate() to allow syncing to the exact NTP time.
Added sanity checking of received timestamp before using it.
Added millis() rollover protection in getEpochTime().
Added new function, setEpochTime(), to set NTPClient's internal currentEpoch from hardware RTC time.
Changed the default updateInterval to 1 hour.
Added 'Advanced_with_RTC' example to demonstrate new capabilities and accuracy.

Sincerely,
afdp777

… to the exact NTP time.

Added sanity checking of received timestamp before using it.
Added millis() rollover protection in getEpochTime().
Added new function, setEpochTime(), to set NTPClient's internal currentEpoch from hardware RTC time.
Changed the default updateInterval to 1 hour.
Added 'Advanced_with_RTC' example to demonstrate new capabilities and accuracy.
@CLAassistant

CLAassistant commented Jun 9, 2021

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@chudsaviet

chudsaviet commented Sep 26, 2021

Copy link
Copy Markdown

I have couple of points:

  1. It conflicts with Enable fractional second timestamps (re-integration of #102) #146 . I have no problems if you complete this PR instead of the latter. We just need fractional time support.
  2. I think this PR shall be split into several. Basically, each point of this PR shall be separate PR.
  3. All CI tests shall be successful.

@JefersonDeLeon JefersonDeLeon left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Tested working and accurate

@per1234 per1234 linked an issue Jun 23, 2024 that may be closed by this pull request
@per1234 per1234 added type: imperfection Perceived defect in any part of project type: enhancement Proposed improvement topic: code Related to content of the project itself labels Jun 23, 2024
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: enhancement Proposed improvement type: imperfection Perceived defect in any part of project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

An 0.5s System Error

5 participants