Repository navigation
Fix #2782, make TIME print independent of time_t width - #2793
Open
sylvesterkaczmarek wants to merge 1 commit into
Open
sylvesterkaczmarek wants to merge 1 commit into
sylvesterkaczmarek wants to merge 1 commit into
Conversation
sylvesterkaczmarek
marked this pull request as ready for review
August 16, 2026 09:40
Author
|
This remains current and mergeable, and the NASA checks are green. Could a maintainer review when convenient? |
Collaborator
|
Thank you @sylvesterkaczmarek for this contribution! I have added this to our team's review list. We have a fairly small team maintaining cFS and are gradually working through our backlog of submissions. |
Signed-off-by: Sylvester Kaczmarek <16242628+sylvesterkaczmarek@users.noreply.github.com>
sylvesterkaczmarek
force-pushed
the
fix-2782-time-print-32bit-final
branch
from
October 7, 2026 14:45
b0a1a04 to
2bbd558
Compare
Author
|
Updated validation is recorded in the PR description for |
Author
|
Is there anything else you need for the time_t-width fix while it is in the review queue? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist (Please check before submitting)
Describe the contribution
Fix #2782.
Make
CFE_TIME_Print()independent of the host C library'stime_twidth.The previous implementation converted cFE seconds to
time_tand calledgmtime_r(). On platforms with a 32-bittime_t, timestamps beyond the signed 32-bit Unix-time range could wrap and produce an incorrect calendar date.This change converts the cFE timestamp directly into the
struct tmfields required by the existing%Y-%j-%H:%M:%Soutput format using 64-bit arithmetic and Gregorian leap-year rules.The public API and printed format remain unchanged.
Regression coverage also exercises the maximum 32-bit cFE seconds value and crosses the year-2100 non-leap-century boundary.
Testing performed
Expected behavior changes
CFE_TIME_Print()no longer depends on the hosttime_trange for supported cFE timestamps.System(s) tested on
dev.Additional context
Issue #2782 reports the existing rollover in a 32-bit TIME build. This change fixes the underlying flight-software behavior rather than making the test accept the wrapped date.
Third party code
None.
Contributor Info - All information REQUIRED for consideration of pull request
Sylvester Kaczmarek, Personal
Validation update on 7 October 2026
Current validated commit
2bbd55873984.The refreshed exact source tree passed the repository's complete non-EDS Code Coverage Analysis workflow on the contributor fork: https://github.com/sylvesterkaczmarek/cFE/actions/runs/37638566914. The job used the normal cFS build container and upstream setup-cfe action, built the configured core modules, ran their CTest suites, and passed coverage enforcement without modifying workflow rules. This verifies the default native Linux unit-test/coverage configuration; it does not claim every target, EDS mode or 32-bit ABI was tested. The validation branch and upstream PR branch point to the same verified commit. No dependency or build-policy changes are included.
The complete upstream workflow result is not claimed from local checks. Fresh fork workflows may require maintainer approval.