from datetime import datetime


def calculate_tz_offset(local_time_str, server_datetime_str):
    """Given a local_time without date and a server_datetime in UTC, calculate the user's
    timezone offset in minutes.  This is not accurate for all cases, but should be approximately
    correct for the most common ones.  It assumes all offsets are less than 12 hours magnitude.
    A positive offset of 13 hours is assumed to be a negative offset of one hour.
    """

    local_datetime = datetime.strptime(local_time_str, '%H:%M:%S')
    server_datetime = datetime.strptime(server_datetime_str, '%Y-%m-%d %H:%M:%S')

    # minutes since midnight
    local_minutes = local_datetime.hour * 60 + local_datetime.minute
    server_minutes = server_datetime.hour * 60 + server_datetime.minute

    tz_offset = None
    if local_minutes == server_minutes:
        return 0  # local_timezone is same as utc
    elif local_minutes > server_minutes:
        minutes_difference = local_minutes - server_minutes
        return minutes_difference * 1 if minutes_difference <= 12*60 else -1
    else:
        minutes_difference = server_minutes - local_minutes
        return minutes_difference * -1 if minutes_difference <= 12*60 else 1