def datetime_from_rfc822(datetime_str):
return datetime.fromtimestamp(mktime_tz(parsedate_tz(datetime_str)), pytz.utc)<EOL>
Turns an RFC822 formatted date into a datetime object.

    Example::

        inputs.datetime_from_rfc822("Wed, 02 Oct 2002 08:00:00 EST")

    :param datetime_str: The RFC822-complying string to transform
    :type datetime_str: str
    :return: A datetime