def _offset_to_min(utc_offset):
 match = re.match('^([+-])?(\\d\\d)(\\d\\d)$', utc_offset)
 if (not match):
  raise SaltInvocationError('Invalid UTC offset')
 sign = ((-1) if (match.group(1) == '-') else 1)
 hours_offset = int(match.group(2))
 minutes_offset = int(match.group(3))
 total_offset = (sign * ((hours_offset * 60) + minutes_offset))
 return total_offset

def _offset_to_min ( utc_offset ) : match = re . match ( '^([+-])?(\\d\\d)(\\d\\d)$' , utc_offset ) if ( not match ) : raise SaltInvocationError ( 'Invalid UTC offset' ) sign = ( ( - 1 ) if ( match . group ( 1 ) == '-' ) else 1 ) hours_offset = int ( match . group ( 2 ) ) minutes_offset = int ( match . group ( 3 ) ) total_offset = ( sign * ( ( hours_offset * 60 ) + minutes_offset ) ) return total_offset
helper function that converts the utc offset string into number of minutes offset .