(self, args)
TIME: Set the system time offset.
TIME: Set the system time offset.
TIME : Set the system time offset .
def time_(self, args):
        """TIME: Set the system time offset."""
        timestr = values.next_string(args)
        list(args)
        # allowed formats:  hh   hh:mm   hh:mm:ss  where hh 0-23, mm 0-59, ss 0-59
        now = datetime.datetime.now() + self.time_offset
        strlist = timestr.replace(b'.', b':').split(b':')
        if len(strlist) == 1:
            strlist = strlist[0].split(b'.')
        if len(strlist) not in (1, 2, 3):
            raise error.BASICError(error.IFC)
        try:
            timelist = [int(s) for s in strlist]
        except ValueError:
            raise error.BASICError(error.IFC)
        timelist += [0] * (3 - len(timelist))
        if timelist[0] > 23 or timelist[1] > 59 or timelist[2] > 59:
            raise error.BASICError(error.IFC)
        newtime = datetime.datetime(now.year, now.month, now.day,
                    timelist[0], timelist[1], timelist[2], now.microsecond)
        self.time_offset += newtime - now
def time_ ( self , args ) : timestr = values . next_string ( args ) list ( args ) # allowed formats:  hh   hh:mm   hh:mm:ss  where hh 0-23, mm 0-59, ss 0-59 now = datetime . datetime . now ( ) + self . time_offset strlist = timestr . replace ( b'.' , b':' ) . split ( b':' ) if len ( strlist ) == 1 : strlist = strlist [ 0 ] . split ( b'.' ) if len ( strlist ) not in ( 1 , 2 , 3 ) : raise error . BASICError ( error . IFC ) try : timelist = [ int ( s ) for s in strlist ] except ValueError : raise error . BASICError ( error . IFC ) timelist += [ 0 ] * ( 3 - len ( timelist ) ) if timelist [ 0 ] > 23 or timelist [ 1 ] > 59 or timelist [ 2 ] > 59 : raise error . BASICError ( error . IFC ) newtime = datetime . datetime ( now . year , now . month , now . day , timelist [ 0 ] , timelist [ 1 ] , timelist [ 2 ] , now . microsecond ) self . time_offset += newtime - now