from datetime import datetime


def estimate_time_shift_from_server_to_user(hh, mm):
    """
    If it's negative means usually server is west of user
    :param hh: hours
    :param mm: minutes
    :return: minutes of shift (rounded to 30)
    """
    now = datetime.now()
    my_hh, my_mm = now.hour, now.minute

    diff = ((my_hh - hh) * 60 + my_mm - mm) / 30.0
    return int(round(diff) * 30.0)