code.py
def adjustBeforeKeyTimePoints(local_time, *hs):
    """
    check if local_time is 5 min be fore h in hs
    if so, get current time from internet and set it to local_time
    Use 24 for 0am
    """
    print('[debug] adjustBeforeKeyTimePoints():', local_time)
    # if it does not hit, no addjustment is done
    lc_h = local_time.hour
    lc_m = local_time.minute
    adjusted = False
    for h in hs:
        if (lc_h, lc_m) == (h - 1, 55):
            local_time = getCurrentTime()
            adjusted = True
            print('[debug] time adjusted:', local_time)
            break
        else:
            pass
            # print('[debug]', (lc_h, lc_m), 'is not', (h, 55))

    return local_time, adjusted

    check if local_time is 5 min be fore h in hs
    if so, get current time from internet and set it to local_time
    Use 24 for 0am
    
check if local_time is 5 min be fore h in hs
if so, get current time from internet and set it to local_time
Use 24 for 0am
check if local_time is 5 min be fore h in hs if so get current time from internet and set it to local_time Use 24 for 0am
def adjustBeforeKeyTimePoints(local_time, *hs):
    print('[debug] adjustBeforeKeyTimePoints():', local_time)
    lc_h = local_time.hour
    lc_m = local_time.minute
    adjusted = False
    for h in hs:
        if (lc_h, lc_m) == (h - 1, 55):
            local_time = getCurrentTime()
            adjusted = True
            print('[debug] time adjusted:', local_time)
            break
        else:
            pass
    return local_time, adjusted
def adjustBeforeKeyTimePoints ( local_time , * hs ) : print ( '[debug] adjustBeforeKeyTimePoints():' , local_time ) lc_h = local_time . hour lc_m = local_time . minute adjusted = False for h in hs : if ( lc_h , lc_m ) == ( h - 1 , 55 ) : local_time = getCurrentTime ( ) adjusted = True print ( '[debug] time adjusted:' , local_time ) break else : pass return local_time , adjusted
check if local_time is 5 min be fore h in hs
if so, get current time from internet and set it to local_time
Use 24 for 0am
check if local_time is 5 min be fore h in hs if so get current time from internet and set it to local_time Use 24 for 0am
"""
    check if local_time is 5 min be fore h in hs
    if so, get current time from internet and set it to local_time
    Use 24 for 0am
    """ # if it does not hit, no addjustment is done # print('[debug]', (lc_h, lc_m), 'is not', (h, 55))
local_time