Skip to content
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

uucore/utmpx: use UTC if offset can't be resolved #6413

Merged
merged 1 commit into from
May 18, 2024

Conversation

cakebaker
Copy link
Contributor

This PR is an attempt to fix some of the errors that make the Build (macos-latest, x86_64-apple-darwin, feat_os_macos) job fail in the CI. It should fix the tests of pinky, uptime, and who, which currently fail with:

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: IndeterminateOffset', src/uucore/src/lib/features/utmpx.rs:192:62

For some unknown reason, OffsetDateTime::now_local() from time is unable to determine the offset and returns an error. The proposed fix simply removes the unwrap and sets a default offset in the error case. I don't know whether this is correct, as I develop "blind", without macOS.

Copy link

GNU testsuite comparison:

Skipping an intermittent issue tests/tail/inotify-dir-recreate (passes in this run but fails in the 'main' branch)

@sylvestre sylvestre merged commit fc80c47 into uutils:main May 18, 2024
66 of 68 checks passed
@cakebaker cakebaker deleted the uucore_utmpx_fix_login_time branch May 19, 2024 09:32
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.

2 participants