def hour_dist(h1, h2):
  abs_dist = abs((h1 % 24) - (h2 % 24))
  if abs_dist > 12:
    return 24 - abs_dist
  else:
    return abs_dist
dataset/ETHPy150Open google/transitfeed/misc/find_pytz_transition_times.py/hour_dist/original