Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information