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
Another developer had a problem with our project and we tracked it down to jingo's datetime filter.
The default format string is %B %e, %Y. It uses %e which is not available on all platforms (according to this list in the Python documentation). I guess replacing that by %d should be enough (although that adds a leading zero).
import datetime; x = datetime.datetime(2012, 12, 3, 12, 1, 34); x.strftime('%e') raises a ValueError exception, invalid format string.
Going through old issues, I realized that I have no idea where %e came from in the first place. It's not in the Python docs. It's from strftime(3) on linux, and all it does is print a space-padded day instead of a zero-padded day (e.g. May 3, 2015 vs May 3, 2015 with %-d vs May 03, 2015 with %d).
Rather than platform/system branching, let's just use %-d, an actually documented python thing. I'll do that soon.
Another developer had a problem with our project and we tracked it down to jingo's
datetime
filter.The default format string is
%B %e, %Y
. It uses%e
which is not available on all platforms (according to this list in the Python documentation). I guess replacing that by %d should be enough (although that adds a leading zero).import datetime; x = datetime.datetime(2012, 12, 3, 12, 1, 34); x.strftime('%e')
raises a ValueError exception, invalid format string.The text was updated successfully, but these errors were encountered: