Skip to content

Refine Sntp_ConvertToUnixTime #105

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

Merged
merged 6 commits into from
Apr 21, 2025

Conversation

aggarg
Copy link
Member

@aggarg aggarg commented Apr 16, 2025

Description

We do not need uint64_t for Unix timestamp as we can fit the time till 7 Feb 2106 06:28:15 in uint32_t and beyond that we cannot differentiate between NTP era 0 and era 1 timestamps.

Ntp_To_Unix_Time

Test Steps

Run unit tests.

Checklist:

  • I have tested my changes. No regression in existing tests.
  • I have modified and/or added unit-tests to cover the code changes in this Pull Request.

Related Issue

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

aggarg and others added 6 commits April 16, 2025 11:00
We do not need uint64_t for Unix timestamp as we can fit the time till
7 Feb 2106 06:28:15 in uint32_t and beyond that we cannot differentiate
between NTP era 0 and era 1 timestamps.

Signed-off-by: Gaurav Aggarwal <[email protected]>
Signed-off-by: Gaurav Aggarwal <[email protected]>
Signed-off-by: Gaurav Aggarwal <[email protected]>
@aggarg aggarg merged commit 31dcafa into FreeRTOS:main Apr 21, 2025
36 of 39 checks passed
@aggarg aggarg deleted the fix_Sntp_ConvertToUnixTime branch April 21, 2025 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants