def extract_offset(data):
	"""Get the numerical offset of the timezone from UTC"""
	parity = 0
	data = data.decode('utf-8')

	if data == 'UTC':
		return 0
	
	# it's an offset of some type; is it positive?
	if data[3] == '+':
		parity = 1
	else:
		parity = -1
	
	# Strip the leading "UTC" and parity indicator
	data = data[4:]

	# Convert the offset to a number for parity processing
	# If there is a n+half-hour offset, remove it from the string,
	# then re-add numerically.
	if ':' in data:
		data = data[:-3]
		data = int(data) + 0.5
	else:
		data = int(data)

	return parity * data