Skip to content

Commit

Permalink
Re-export wsgiref.handlers.format_date_time
Browse files Browse the repository at this point in the history
  • Loading branch information
AA-Turner committed Aug 28, 2023
1 parent 3cbd582 commit f5a444d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sphinx/util/http_date.py
Expand Up @@ -5,16 +5,16 @@

import time
import warnings
from email.utils import formatdate, parsedate_tz
from email.utils import parsedate_tz
from wsgiref.handlers import format_date_time

from sphinx.deprecation import RemovedInSphinx90Warning

_GMT_OFFSET = float(time.localtime().tm_gmtoff)


def epoch_to_rfc1123(epoch: float) -> str:
"""Return HTTP-date string from epoch offset."""
return formatdate(epoch, usegmt=True)
epoch_to_rfc1123 = format_date_time
"""Return HTTP-date string from epoch offset."""


def rfc1123_to_epoch(rfc1123: str) -> float:
Expand Down

0 comments on commit f5a444d

Please sign in to comment.