Skip to content

fix linux bootTime #1249

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 1 commit into from
Sep 5, 2024
Merged

fix linux bootTime #1249

merged 1 commit into from
Sep 5, 2024

Conversation

m4rch3n1ng
Copy link
Contributor

@m4rch3n1ng m4rch3n1ng commented Sep 5, 2024

the previous implementation was adding the elapsed time since boot to the current time instead of subtracting it.

previous implementation:

$ fastfetch
    Uptime: 8 days, 13 hours, 48 mins
$ fastfetch --uptime-format '{6}'
    Uptime: Uptime: 2024-09-13 17:16:04

where the bootTime (--uptime-format '{6}') is ~8 days in the future

new implementation:

$ fastfetch
    Uptime: 8 days, 13 hours, 52 mins
$ fastfetch --uptime-format '{6}'
    Uptime: 2024-08-27 13:34:13

see also

result->bootTime = ffTimeGetNow() - result->uptime;

the previous implementation was adding the elapsed time since
boot to the current time instead of subtracting it
@CarterLi
Copy link
Member

CarterLi commented Sep 5, 2024

oops. God knows what I was thinking about.

@CarterLi CarterLi merged commit f4424b4 into fastfetch-cli:dev Sep 5, 2024
@m4rch3n1ng m4rch3n1ng deleted the fix-linux-bootime branch September 5, 2024 02:44
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