@staticmethod
def __rounded_time_shift(time_shift):
    """
        Return the given time shift in seconds, but rounded to
        full hours. The argument is also assumed to be given in
        seconds.
        """
    minute = 60.0
    hour = 60.0 * minute
    if time_shift == 0:
        return 0.0
    absolute_time_shift = abs(time_shift)
    signum = time_shift / absolute_time_shift
    absolute_rounded_time_shift = int((absolute_time_shift + 7.5 * minute) /
        (15.0 * minute)) * (15.0 * minute)
    return signum * absolute_rounded_time_shift
