labpack/records/time.py
def fromISO(cls, iso_string):

        ''' a method for constructing a labDT object from a timezone aware ISO string
        
        :param iso_string: string with date and time info in ISO format
        :return: labDT object
        '''

    # validate input
        title = 'ISO time input for labDT.fromISO'
        isopattern = re.compile('\d{4}-?\d{2}-?\d{2}[\s|T].*')
        if not isopattern.search(iso_string):
            raise ValueError('\n%s is not a valid ISO string.' % title)
        python_datetime = dTparser.parse(iso_string)
        if not python_datetime.tzinfo:
            raise ValueError('\n%s must have timezone info.' % title)

    # construct labDT from parsed string
        dT = python_datetime.astimezone(pytz.utc)
        dt_kwargs = {
            'year': dT.year,
            'month': dT.month,
            'day': dT.day,
            'hour': dT.hour,
            'minute': dT.minute,
            'second': dT.second,
            'microsecond': dT.microsecond,
            'tzinfo': dT.tzinfo
        }
        return labDT(**dt_kwargs)
 a method for constructing a labDT object from a timezone aware ISO string
        
        :param iso_string: string with date and time info in ISO format
        :return: labDT object
        
a method for constructing a labDT object from a timezone aware ISO string
a method for constructing a labDT object from a timezone aware ISO string
def fromISO(cls, iso_string):
        title = 'ISO time input for labDT.fromISO'
        isopattern = re.compile('\d{4}-?\d{2}-?\d{2}[\s|T].*')
        if not isopattern.search(iso_string):
            raise ValueError('\n%s is not a valid ISO string.' % title)
        python_datetime = dTparser.parse(iso_string)
        if not python_datetime.tzinfo:
            raise ValueError('\n%s must have timezone info.' % title)
        dT = python_datetime.astimezone(pytz.utc)
        dt_kwargs = {
            'year': dT.year,
            'month': dT.month,
            'day': dT.day,
            'hour': dT.hour,
            'minute': dT.minute,
            'second': dT.second,
            'microsecond': dT.microsecond,
            'tzinfo': dT.tzinfo
        }
        return labDT(**dt_kwargs)
def fromISO ( cls , iso_string ) : title = 'ISO time input for labDT.fromISO' isopattern = re . compile ( '\d{4}-?\d{2}-?\d{2}[\s|T].*' ) if not isopattern . search ( iso_string ) : raise ValueError ( '\n%s is not a valid ISO string.' % title ) python_datetime = dTparser . parse ( iso_string ) if not python_datetime . tzinfo : raise ValueError ( '\n%s must have timezone info.' % title ) dT = python_datetime . astimezone ( pytz . utc ) dt_kwargs = { 'year' : dT . year , 'month' : dT . month , 'day' : dT . day , 'hour' : dT . hour , 'minute' : dT . minute , 'second' : dT . second , 'microsecond' : dT . microsecond , 'tzinfo' : dT . tzinfo } return labDT ( ** dt_kwargs )
a method for constructing a labDT object from a timezone aware ISO string
a method for constructing a labDT object from a timezone aware ISO string
''' a method for constructing a labDT object from a timezone aware ISO string
        
        :param iso_string: string with date and time info in ISO format
        :return: labDT object
        ''' # validate input
 # construct labDT from parsed string

None
cls
iso_string
string with date and time info in ISO format
string with date and time info in ISO format