from datetime import datetime
import locale


def format_datetime_2822(date_obj: datetime) -> str:
    """
    Get an RFC 2822-formatted string for a datetime.
    """
    old = locale.setlocale(locale.LC_ALL)
    locale.setlocale(locale.LC_ALL, 'C')
    date = date_obj.strftime('%a, %d %b %Y %H:%M:%S %z')
    locale.setlocale(locale.LC_ALL, old)
    return date