def to_rfc1123(when):
 assert (when.tzinfo is None)
 return (when.strftime(_RFC1123) + 'GMT')

def to_rfc1123 ( when ) : assert ( when . tzinfo is None ) return ( when . strftime ( _RFC1123 ) + 'GMT' )
convert a datetime to rfc1123 format .