Skip to content

sys/fmt: add {fmt,scn}_time_tm_iso8601 #21391

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 3 commits into from
Apr 10, 2025
Merged

Conversation

fabian18
Copy link
Contributor

@fabian18 fabian18 commented Apr 8, 2025

Contribution description

Because I have already copied the code to print a struct tm too often, I now added it to the fmt module.

Testing procedure

make -C tests/unittests tests-fmt flash term

2025-04-08 18:20:25,437 # RIOT native interrupts/signals initialized.
2025-04-08 18:20:25,438 # RIOT native64 board initialized.
2025-04-08 18:20:25,438 # RIOT native hardware initialization complete.
2025-04-08 18:20:25,438 # 
2025-04-08 18:20:25,438 # main(): This is RIOT! (Version: 2025.04-devel-449-g3c6492-pr/fmt_time)
2025-04-08 18:20:25,438 # .................................
2025-04-08 18:20:25,438 # OK (33 tests)
2025-04-08 18:20:25,438 # 
2025-04-08 18:20:25,438 # native: exiting
2025-04-08 18:24:17,364 # Exiting Pyterm

Issues/PRs references

#21343

@github-actions github-actions bot added Area: tests Area: tests and testing framework Area: sys Area: System labels Apr 8, 2025
Copy link
Contributor

@benpicco benpicco left a comment

Choose a reason for hiding this comment

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

Thank you, this is quite useful indeed!

@benpicco benpicco added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Apr 9, 2025
@kaspar030
Copy link
Contributor

At some point fmt was supposed to be usable without stdio code, as an alternative so to say. Is this an intentional added dependency?

@riot-ci
Copy link

riot-ci commented Apr 9, 2025

Murdock results

✔️ PASSED

d79b27d tests/periph/rtc: use time fmt API

Success Failures Total Runtime
10295 0 10295 11m:19s

Artifacts

@fabian18
Copy link
Contributor Author

At some point fmt was supposed to be usable without stdio code, as an alternative so to say. Is this an intentional added dependency?

I did not notice the breakage. Obviously the module would become a bit absurd with snprintf. I am going to rewrite my functions without stdio.

@benpicco
Copy link
Contributor

Please squash!

@crasbe
Copy link
Contributor

crasbe commented Apr 10, 2025

Unrelated to your changes, but maybe you can fix the static-warning while you're here:

image

You can squash that change directly.

@fabian18 fabian18 added this pull request to the merge queue Apr 10, 2025
Merged via the queue into RIOT-OS:master with commit db0f497 Apr 10, 2025
25 checks passed
@crasbe crasbe added this to the Release 2025.04 milestone Apr 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: sys Area: System Area: tests Area: tests and testing framework CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants