You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
asctime in logging will never output because strftime is not an attribute of time #725
Interesting. I didn't think there was an separate time package given that there's already time in the standard image.
The micropython-lib version only implements strftime, is there a specific reason to split the packages up like that?
Interesting. I didn't think there was an separate time package given that there's already time in the standard image. The micropython-lib version only implements strftime, is there a specific reason to split the packages up like that?
@DracoTomes In order to keep firmware size down, we provide the most common / most useful stuff by default. Then we provide optional extras.
Activity
dpgeorge commentedon Sep 12, 2023
To support
time.strftimeyou need to install the time module extension, eg using:andrewleech commentedon Sep 12, 2023
Perhaps this should be added as a dependency for logging?
I guess it's optional behaviour though, a comment in the code along these lines might be more suitable
DracoTomes commentedon Sep 12, 2023
Interesting. I didn't think there was an separate time package given that there's already time in the standard image.
The micropython-lib version only implements strftime, is there a specific reason to split the packages up like that?
jimmo commentedon Sep 13, 2023
@DracoTomes In order to keep firmware size down, we provide the most common / most useful stuff by default. Then we provide optional extras.
Really we should rename micropython-lib's
timetotime-strftimeto indicate that it's an extension package that just addsstrftimetotime. (See the very last paragraph of https://github.com/micropython/micropython-lib/#notes-on-terminology).For similar reasons, I think it should be optional. But yes, documentation/comment would definitely be a good idea.
DracoTomes commentedon Sep 13, 2023
That was my assumption as well, good to know.
Coming at this as a new user documentation/rename would definitely be welcome.
Should I close this Issue now, given there's not actually anything wrong or should I leave this open to reference for a future commit?