Skip to content

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

Merged
sylvestre merged 1 commit intouutils:mainfrom
cakebaker:uucore_utmpx_fix_login_time
May 18, 2024
Merged

uucore/utmpx: use UTC if offset can't be resolved#6413
sylvestre merged 1 commit intouutils:mainfrom
cakebaker:uucore_utmpx_fix_login_time

Conversation

@cakebaker
Copy link
Copy Markdown
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.

@github-actions
Copy link
Copy Markdown

GNU testsuite comparison:

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

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