def parse_to_aware_datetime(value):
 if isinstance(value, datetime.datetime):
  datetime_obj = value
 else:
  datetime_obj = parse_timestamp(value)
 if (datetime_obj.tzinfo is None):
  datetime_obj = datetime_obj.replace(tzinfo=tzutc())
 else:
  datetime_obj = datetime_obj.astimezone(tzutc())
 return datetime_obj

def parse_to_aware_datetime ( value ) : if isinstance ( value , datetime . datetime ) : datetime_obj = value else : datetime_obj = parse_timestamp ( value ) if ( datetime_obj . tzinfo is None ) : datetime_obj = datetime_obj . replace ( tzinfo = tzutc ( ) ) else : datetime_obj = datetime_obj . astimezone ( tzutc ( ) ) return datetime_obj
converted the passed in value to a datetime object with tzinfo .