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
html_last_updated_fmt does not support UTC offset (%z) #8683
Milestone
Comments
tk0miya
added a commit
to tk0miya/sphinx
that referenced
this issue
Jan 12, 2021
…t (%z) sphinx.util.i18n:format_date() does not support %z so far. This adds a mapping for %z to the babel form 'ZZZ'.
tk0miya
added a commit
to tk0miya/sphinx
that referenced
this issue
Jan 12, 2021
…for %Z sphinx.util.i18n:format_date() converts '%Z' to full name of time zone unexpectedly. It should be converted to short name.
Thank you for reporting. Both |
tk0miya
added a commit
to tk0miya/sphinx
that referenced
this issue
Jan 12, 2021
…t (%z) sphinx.util.i18n:format_date() does not support %z so far. This adds a mapping for %z to the babel form 'ZZZ'.
tk0miya
added a commit
to tk0miya/sphinx
that referenced
this issue
Jan 12, 2021
…for %Z sphinx.util.i18n:format_date() converts '%Z' to full name of time zone unexpectedly. It should be converted to short name.
@tk0miya thanks for fixing. |
Could you try to make a pull request instead of issue? Contributions are always welcome :-) |
tk0miya
added a commit
that referenced
this issue
Jan 13, 2021
Fix #8683: html_last_updated_fmt does not support UTC offset (%z)
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
According to Sphinx docs, html_last_updated_fmt uses the
strftime()
.The python strftime format codes defines:
%z
as UTC offset in the form ±HHMM[SS[.ffffff]] (empty string if the object is naive).However, with:
I get a literal
%z
at output:The expected output in my case is
... +0100
.Notes:
%Z
(Time zone name) does "work". On my local box is givesGMT+01:00
, but on our CI pipeline is gives the full stringCoordinated Universal Time
which is a bit anoying. I guess it may be platform dependent.The "literal %z"-issue occurs on both platforms.
%z
works well withstrftime()
.%U
and%W
(week numbers) which throws an exception. Someone may want to raise a separate issue for this.The text was updated successfully, but these errors were encountered: