Grab end time with regular expression.
173555
def parse_metadata_string(metadata_string):
        """"""
        regex = r"STOP_DATE.+?VALUE\s*=\s*\"(.+?)\""
        match = re.search(regex, metadata_string, re.DOTALL)
        end_time_str = match.group(1)
        return end_time_str
1035730
def str(self,local):
        
        s = self.start_time.str(local) \
            + u" to " \
            + self.end_time.str(local)
        return s
53520
def handle_time(msg):
    """"""
    return msg.copy(ack=0, payload=calendar.timegm(time.localtime()))
290543
def strtime(at=None, fmt=PERFECT_TIME_FORMAT):
    """"""
    if not at:
        at = utcnow()
    return at.strftime(fmt)
1343856
def time_to_text(time):
    """"""
    
    if time < 0.001:
        return str(round(time * 1000000)) + " µs"
    elif time < 1:
        return str(round(time * 1000)) + " ms"
    elif time < 60:
        return str(round(time, 1)) + " s"
    else:
        return str(round(time / 60, 1)) + " min"
194724
def _parse_deadline(deadline):
        """"""
        if '-' in deadline and len(deadline) == 10:
            return deadline

        if '.' in deadline and len(deadline) == 10:  # russian format dd.mm.yyyy to yyyy-mm-dd
            dmy = deadline.split('.')
            if len(dmy) == 3 and all(v is not None for v in dmy):
                return '-'.join(reversed(dmy))

        raise exceptions.RumetrUnparsableDeadline()
670942
def end_datetime(self) -> Optional[datetime.datetime]:
        
        if not self.intervals:
            return None
        return max([x.end for x in self.intervals])
335019
def _parse(value, strict=True):
    
    pattern = r'(?:(?P<hours>\d+):)?(?P<minutes>\d+):(?P<seconds>\d+)'
    match = re.match(pattern, value)
    if not match:
        raise ValueError('Invalid duration value: %s' % value)
    hours = safe_int(match.group('hours'))
    minutes = safe_int(match.group('minutes'))
    seconds = safe_int(match.group('seconds'))

    check_tuple((hours, minutes, seconds,), strict)

    return (hours, minutes, seconds,)
462778
def remove_timedim(self, var):
        """"""
        if self.pps and var.dims[0] == 'time':
            data = var[0, :, :]
            data.attrs = var.attrs
            var = data

        return var
466620
def elapse_time(start, end=None, precision=3):
    
    if end is None:
        end = time_module.time()
    return round(end-start, precision)
855241
def _ts_parse(ts):
    """"""
    dt = datetime.strptime(ts[:19],"%Y-%m-%dT%H:%M:%S")
    if ts[19] == '+':
        dt -= timedelta(hours=int(ts[20:22]),minutes=int(ts[23:]))
    elif ts[19] == '-':
        dt += timedelta(hours=int(ts[20:22]),minutes=int(ts[23:]))
    return dt.replace(tzinfo=pytz.UTC)
682507
def set_end(self,time):
    
    self.add_var_opt('gps-end-time', time)
    self.__end = time
    self.__set_output()
728096
public static long endTime(String str, PrintStream stream) {
    long elapsed = endTime();
    stream.println(str + " Time elapsed: " + (elapsed) + " ms");
    return elapsed;
  }
353286
def endswith(self, suffix, ignore_case=False, options=None):
        
        return self.regex(re.escape(suffix) + '$', ignore_case=ignore_case, options=options)
431047
def time2string(tstamp, micro=True):
    """"""
    tformat = TIME_FORMAT if micro else TIME_FORMAT[:-len(MICRO)]
    return tstamp.strftime(tformat)
434927
def get_endtime(jid):
    '''
    
    '''
    jid_dir = salt.utils.jid.jid_dir(jid, _job_dir(), __opts__['hash_type'])
    etpath = os.path.join(jid_dir, ENDTIME)
    if not os.path.exists(etpath):
        return False
    with salt.utils.files.fopen(etpath, 'r') as etfile:
        endtime = salt.utils.stringutils.to_unicode(etfile.read()).strip('\n')
    return endtime
1108386
def end_time(self):
        
        resource_list = self.traffic_incident()
        end_time = namedtuple('end_time', 'end_time')
        if len(resource_list) == 1 and resource_list[0] is None:
            return None
        else:
            try:
                return [end_time(resource['end'])
                        for resource in resource_list]
            except (KeyError, TypeError):
                return [end_time(resource['EndTimeUTC'])
                        for resource in resource_list]