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

Travel back in time to 1900 #4666

Open
lawrenceakka opened this issue Jun 19, 2024 · 2 comments · May be fixed by #4671
Open

Travel back in time to 1900 #4666

lawrenceakka opened this issue Jun 19, 2024 · 2 comments · May be fixed by #4671

Comments

@lawrenceakka
Copy link

This is not really a bug - more of a small feature request.

The HeaderClock is, well, a clock. It displays the time. It would be nice if it could display the date as well. I spent more time than I will admit trying to figure out why, when I set time_format on Header() to "%c" the time is displayed as 'Mon Jan 1 22:36:22 1900'. In fact, it is because line 92 in header.py says:

return Text(datetime.now().time().strftime(self.time_format))

When a datetime is converted by time(), all date info is stripped.

The time() seems unnecessary. I propose that the line be replaced by

return Text(datetime.now().strftime(self.time_format))

That would allow date formatting strings to be used as well, for those of us who can't remember what day it is. You might also need to change the default width on HeaderClockSpace to auto.

I'll do a PR if you really want one :)

Copy link

Thank you for your issue. Give us a little time to review it.

PS. You might want to check the FAQ if you haven't done so already.

This is an automated reply, generated by FAQtory

@willmcgugan
Copy link
Collaborator

Happy to accept a PR for that.

@lawrenceakka lawrenceakka linked a pull request Jun 24, 2024 that will close this issue
3 tasks
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 a pull request may close this issue.

2 participants