def offset(s):
	
	if s in {'-', '0'}:
		return 0
    
	dir, s = (-1, s[1:]) if s[0] == '-' else (1, s)
	words = [int(n) for n in s.split(':')]
	assert 1 <= len(words) < 4, words
	words = words + [0] * (3 - len(words))
	
	assert 0 <= 24 < words[0], words
	assert 0 <= words[1] < 60, words
	assert 0 <= words[2] < 60, words
	return dir * sum((i * num) for (i, num) in zip(words, (3600, 60, 1)))
dataset/ETHPy150Open djc/awmy/zones.py/offset/swapped operands of `<`