def s3_utc(dt):
 if dt:
  if (dt.tzinfo is None):
   return dt.replace(tzinfo=dateutil.tz.tzutc())
  return dt.astimezone(dateutil.tz.tzutc())
 else:
  return None

def s3_utc ( dt ) : if dt : if ( dt . tzinfo is None ) : return dt . replace ( tzinfo = dateutil . tz . tzutc ( ) ) return dt . astimezone ( dateutil . tz . tzutc ( ) ) else : return None
get a datetime object for the same date/time as the datetime object .