def convert_to_server_timezone(date, local_tz='UTC', server_tz=None, user=DEFAULT_USER):
  api = get_oozie(user)

  if server_tz is None:
    oozie_conf = api.get_configuration()
    server_tz = oozie_conf.get('oozie.processing.timezone') or 'UTC'

  if date and date.startswith('$'):
    return date

  # To support previously created jobs
  if date.endswith('Z'):
    date = date[:-1]
    local_tz = 'UTC'

  try:
    date_local_tz = parser.parse(date)
    date_local_tz = date_local_tz.replace(tzinfo=tz.gettz(local_tz))
    date_server_tz = date_local_tz.astimezone(tz.gettz(server_tz))

    date_server_tz = date_server_tz.strftime('%Y-%m-%dT%H:%M')
    # Oozie timezone is either UTC or GMT(+/-)####
    if 'UTC' == server_tz:
      return date_server_tz + u'Z'
    else:
      return date_server_tz + u'+' + re.split('[+-]', server_tz)[1]
  except TypeError, ValueError:
    LOG.error(date % "Failed to convert Oozie timestamp: %s")
  return None
dataset/ETHPy150Open cloudera/hue/apps/oozie/src/oozie/utils.py/convert_to_server_timezone/swapped operands of `%`