labpack/records/time.py
def pyLocal(self, time_zone=''):

        ''' a method to report a python datetime from a labDT object

        :param time_zone: [optional] string with timezone to report in
        :return: string with date and time info
        '''

    # validate inputs
        get_tz = get_localzone()
        title = 'Timezone input for labDT.pyLocal'
        if time_zone:
            # if time_zone.lower() in ('utc', 'uct', 'universal', 'zulu'):
            #     raise ValueError('time_zone cannot be UTC. %s requires a local timezone value. Try:\nfor tz in pytz.all_timezones:\n  print tz' % title)
            try:
                get_tz = tz.gettz(time_zone)
            except:
                raise ValueError('\n%s is not a valid timezone format. Try:\nfor tz in pytz.all_timezones:\n  print tz' % title)

    # construct python datetime from labDT
        dT = self.astimezone(get_tz)
        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 to report a python datetime from a labDT object

        :param time_zone: [optional] string with timezone to report in
        :return: string with date and time info
        
a method to report a python datetime from a labDT object
a method to report a python datetime from a labDT object
def pyLocal(self, time_zone=''):
        get_tz = get_localzone()
        title = 'Timezone input for labDT.pyLocal'
        if time_zone:
            try:
                get_tz = tz.gettz(time_zone)
            except:
                raise ValueError('\n%s is not a valid timezone format. Try:\nfor tz in pytz.all_timezones:\n  print tz' % title)
        dT = self.astimezone(get_tz)
        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 pyLocal ( self , time_zone = '' ) : get_tz = get_localzone ( ) title = 'Timezone input for labDT.pyLocal' if time_zone : try : get_tz = tz . gettz ( time_zone ) except : raise ValueError ( '\n%s is not a valid timezone format. Try:\nfor tz in pytz.all_timezones:\n  print tz' % title ) dT = self . astimezone ( get_tz ) 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 to report a python datetime from a labDT object
a method to report a python datetime from a labDT object
''' a method to report a python datetime from a labDT object

        :param time_zone: [optional] string with timezone to report in
        :return: string with date and time info
        ''' # validate inputs
 # if time_zone.lower() in ('utc', 'uct', 'universal', 'zulu'):
 #     raise ValueError('time_zone cannot be UTC. %s requires a local timezone value. Try:\nfor tz in pytz.all_timezones:\n  print tz' % title)
 # construct python datetime from labDT

string with date and time info
string with date and time info
self
time_zone
[optional] string with timezone to report in
[ optional ] string with timezone to report in