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

[cmds] Fix off-by-one bug in getty @T command #2021

Merged
merged 1 commit into from
Sep 16, 2024

Conversation

vkoskiv
Copy link
Contributor

@vkoskiv vkoskiv commented Sep 16, 2024

The @T command, when placed in /etc/issue, displays the current system time. The shuffling of the date string in when() had an off-by-one error, which meant that instead of showing 17:42:00, it showed 77:42:00

The `@T` command, when placed in /etc/issue, displays the current system time.
The shuffling of the date string in `when()` had an off-by-one error, which
meant that instead of showing `17:42:00`, it showed `77:42:00`
@ghaerr
Copy link
Owner

ghaerr commented Sep 16, 2024

Nice catch, and I have been wondering when someone might actually use some of the @ variables in /etc/issue!

@ghaerr ghaerr merged commit e4c2bcb into ghaerr:master Sep 16, 2024
1 check passed
@vkoskiv vkoskiv deleted the getty-fix branch September 17, 2024 08:30
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