Gets the time of this assessment was completed.

        return: (osid.calendaring.DateTime) - the end time
        raise:  IllegalState - ``has_ended()`` is ``false``
        *compliance: mandatory -- This method must be implemented.*
185650
def get_completion_time(self):
        
        if not self.has_ended():
            raise errors.IllegalState('this assessment has not yet ended')
        if not self._my_map['completionTime']:
            raise errors.OperationFailed('someone forgot to set the completion time')
        completion_time = self._my_map['completionTime']
        return DateTime(year=completion_time.year,
                        month=completion_time.month,
                        day=completion_time.day,
                        hour=completion_time.hour,
                        minute=completion_time.minute,
                        second=completion_time.second,
                        microsecond=completion_time.microsecond)
604504
def end_time(self):
        
        return float(self.strain.start_time + (len(self.strain) - self.total_corruption) / self.sample_rate)
595587
def close(self, end_time=None):
        
        self._check_ended()

        if end_time:
            self.end_time = end_time
        else:
            self.end_time = time.time()
        self.in_progress = False
119289
def elapsed_time(self):
        
        if self._end_time:
            elapsed_time = round(self._end_time - self._start_time, 3)
            return elapsed_time
        else:
            return None
1125653
def get_end_time(self):
        """"""
        mda_dict = self.filehandle.attributes()
        core_mda = mda_dict['coremetadata']
        end_time_str = self.parse_metadata_string(core_mda)
        self._end_time = datetime.strptime(end_time_str, "%Y-%m-%dT%H:%M:%SZ")
423369
def get_progress(start, finish):
    
    now = datetime.now()
    dif_time_start = start - now
    dif_time_finish = finish - now

    if dif_time_start.days < 0 and dif_time_finish.days < 0:
        return PROGRESS_STATES[3][0]
    elif dif_time_start.days < 0 and dif_time_finish.days >= 1:
        return PROGRESS_STATES[2][0]
    elif dif_time_start.days >= 1 and dif_time_finish.days >= 1:
        return PROGRESS_STATES[0][0]
    else:
        return PROGRESS_STATES[2][0]
508525
def get_time(self):
        
        if (self.steam_time_offset is None
           or (self.align_time_every and (time() - self._offset_last_check) > self.align_time_every)
           ):
            self.steam_time_offset = get_time_offset()

            if self.steam_time_offset is not None:
                self._offset_last_check = time()

        return int(time() + (self.steam_time_offset or 0))
284145
public long getLastAccessedTime() {
        if (!_iSess.isValid())
            throw new IllegalStateException();
        long value = 0;
        if (_iSess != null) {
            value = _iSess.getLastAccessedTime();
        }
        return value;
    }
1147353
def _refresh_state(self):
    
    if self._is_complete:
      return

    if not self._future:
      raise Exception('Please implement this in the derived class')

    if self._future.done():
      self._is_complete = True
      self._end_time = datetime.datetime.utcnow()
      try:
        self._result = self._future.result()
      except Exception as e:
        message = str(e)
        self._fatal_error = JobError(location=traceback.format_exc(), message=message,
                                     reason=str(type(e)))
1013365
def datetime(self):
        ''
        index = self.data.index.remove_unused_levels()
        return pd.to_datetime(index.levels[0])
482082
def get(self):
        
        now = datetime.now()
        if self._start_time:
            if self._stop_time:
                return (self._stop_time - self._start_time).total_seconds()
            return (now - self._start_time).total_seconds()
        return 0.
1361491
def get_end_date_metadata(self):
        
        metadata = dict(self._end_date_metadata)
        metadata.update({'existing_date_time_values': self.my_osid_object_form._my_map['endDate']})
        return Metadata(**metadata)
986673
public function getFinishTime()
    {
        if ($this->hasData(OntologyDeliveryExecution::PROPERTY_TIME_END)) {
            return $this->getData(OntologyDeliveryExecution::PROPERTY_TIME_END);
        }
        return null;
    }
646821
def get_current_time(self):
        
        hms = [int(self.get_current_controller_value(i)) for i in range(406, 409)]
        return datetime.time(*hms)
935551
def status(self):
        
        myNow = timezone.localtime(timezone=self.tz)
        if getAwareDatetime(self.date_to, self.time_to, self.tz) < myNow:
            return "finished"
        elif getAwareDatetime(self.date_from, self.time_from, self.tz) < myNow:
            return "started"
223394
def duration(self):
        
        if self.end_datetime is None or self.start_datetime is None:
            return 0
        return (self.end_datetime - self.start_datetime).total_seconds()
1055759
def date(self, pattern='%Y-%m-%d', end_datetime=None):
        
        return self.date_time(end_datetime=end_datetime).strftime(pattern)