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

Properly strip time zones which are west of UTC #13128

Merged
merged 2 commits into from
Nov 13, 2024

Conversation

mitya57
Copy link
Contributor

@mitya57 mitya57 commented Nov 13, 2024

Feature or Bugfix

  • Bugfix

Purpose

Properly strip time zones which are west of UTC. Such timezones won’t have + character, they will have - instead.

This fixes test failure which was seen in Debian:

        iso_local = dt.astimezone().isoformat(' ').split('+')[0]
        fd_local = i18n.format_date(fmt, date=dt, language='en', local_time=True)
>       assert fd_local == iso_local
E       AssertionError: assert '2016-08-06 17:11:17' == '2016-08-06 17:11:17-12:00'
E         
E         - 2016-08-06 17:11:17-12:00
E         ?                    ------
E         + 2016-08-06 17:11:17
tests/test_util/test_util_i18n.py:111: AssertionError

mitya57 and others added 2 commits November 13, 2024 13:04
@AA-Turner AA-Turner changed the title test_util_i18n: Properly strip time zones which are west of UTC Properly strip time zones which are west of UTC Nov 13, 2024
@AA-Turner AA-Turner merged commit d6da26a into sphinx-doc:master Nov 13, 2024
23 checks passed
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

Successfully merging this pull request may close these issues.

2 participants