-
Notifications
You must be signed in to change notification settings - Fork 139
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
strftime
doesn't work properly on Alpine Linux.
#42
Comments
This is an issue with Alpine Linux in general? strange. Is there anything on stackoverflow about it? |
This appears to be an issue with musl's Can anyone point to any documentation that says what the If this is behavior that musl is supposed to implement, then we should file an issue upstream. Otherwise, we'll have to look for workarounds. |
This is all I could find about it: http://stackoverflow.com/a/28916983 Which quotes Glibc notes for
|
I emailed the musl mailing list and it looks like they're willing to add support for '-', '_', and '0'. I'll see about throwing a patch together. In the meantime you'll need a workaround if you want to use the image, which should be as easy as:
|
@edsrzf any update on this? |
@AlJohri I don't think @edsrzf is actively working on this any more. |
The workaround falls apart if you are using that formatting string as part of a larger pattern, not on its own (as seen above). And the workaround requires you to alter the source code of the Python application. When attempting to run a program on Alpine Linux, the vast majority of the source code is usually not under your direct control and having to fork it is a pain. When encountering an issue like this, it's also a huge red flag. If this simple thing doesn't work, and fails silently in a way that is not obvious to debug, what other subtle differences am I going to encounter? At that point, it's often much easier to simply abandon Alpine Linux and revert back to a more typical distro like Debian. |
FYI, I believe that |
I can confirm this problem on
I ended up using |
Fixed in either musl, alpine, or python by
|
Just for reference: the issue is also fixed in
|
OSX:
iron/python:2
The last line is an empty string (and no error) on Alpine Linux. This bug also affects the regular APK version of Python on Alpine Linux. Is there somewhere else/better that I should report this bug? I would love to use Alpine Linux, but we actually use this
%-I
in astrftime
call in our app, so we can't.The text was updated successfully, but these errors were encountered: