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

linkcheck: Use correct function to convert from UTC time to UNIX epoch #11649

Merged
merged 6 commits into from Aug 28, 2023

Commits on Aug 26, 2023

  1. linkcheck: Use correct function to convert from UTC time to UNIX epoch

    After subtracting the offset, we get time in UTC. But time.mktime()
    expects a time struct in local time, not in UTC. The correct function
    for converting UTC time to UNIX epoch is calendar.timegm().
    
    This fixes hanging tests when the local timezone is to the west of UTC.
    One could test this using:
    
    TZ=America/New_York python3 -m pytest -k test_too_many_requests_retry_after_HTTP_date
    mitya57 committed Aug 26, 2023
    Copy the full SHA
    c44f300 View commit details
    Browse the repository at this point in the history

Commits on Aug 27, 2023

  1. Copy the full SHA
    6a45b70 View commit details
    Browse the repository at this point in the history
  2. Update CHANGES

    AA-Turner committed Aug 27, 2023
    Copy the full SHA
    e76ad82 View commit details
    Browse the repository at this point in the history

Commits on Aug 28, 2023

  1. Use rfc1123_to_epoch

    AA-Turner committed Aug 28, 2023
    Copy the full SHA
    3cbd582 View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    f5a444d View commit details
    Browse the repository at this point in the history
  3. Revert "Re-export wsgiref.handlers.format_date_time"

    This reverts commit f5a444d.
    AA-Turner committed Aug 28, 2023
    Copy the full SHA
    9676055 View commit details
    Browse the repository at this point in the history