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

Local time? #43

Closed
kseistrup opened this issue Aug 29, 2023 · 3 comments
Closed

Local time? #43

kseistrup opened this issue Aug 29, 2023 · 3 comments

Comments

@kseistrup
Copy link

Kuroko's time module seems to have two methods only — sleep() and time(). Is there a way to get the local time from within kuroko?

@klange
Copy link
Collaborator

klange commented Dec 22, 2023

I was not comfortable adding additional functionality to the time module while it was still part of the core. Now that it has been broken out into a shared object module, it can be extended.

There are a lot of functions to implement to match Python. The following were all there prior to 3.3, and are mostly just wrappers around the platform C library, so they have priority:

  • asctime
  • ctime
  • gmtime
  • localtime
  • mktime
  • strftime
  • strptime
  • tzset

Python 3.3 and 3.7 each added other functions for providing access to monotonic clocks, process times, and so on.

@kseistrup
Copy link
Author

Sounds good. Personally, I would be fine with even a subset of the list above. I rarely use the monotonic clocks et cetera, so I could easily do without those, even in the long run. But the localtime thing is a sore lack for me.

@klange klange closed this as completed Dec 24, 2023
@kseistrup
Copy link
Author

🤸

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

No branches or pull requests

2 participants