code: def _getLocalWhen(self, date_from, date_to=None):
          
          dateFrom, timeFrom = getLocalDateAndTime(date_from, self.time_from,
                                                   self.tz, dt.time.min)
  
          if date_to is not None:
              dateTo, timeTo = getLocalDateAndTime(date_to, self.time_to, self.tz)
          else:
              if self.time_to is not None:
                  dateTo, timeTo = getLocalDateAndTime(date_from, self.time_to, self.tz)
              else:
                  dateTo = dateFrom
                  timeTo = None
  
          if dateFrom == dateTo:
              retval = _("{date} {atTime}").format(date=dateFormat(dateFrom),
                          atTime=timeFormat(timeFrom, timeTo, gettext("at ")))
          else:
              retval = _("{date} {atTime}").format(date=dateFormat(dateFrom),
                          atTime=timeFormat(timeFrom, prefix=gettext("at ")))
              retval = _("{dateTimeFrom} to {dateTo} {atTimeTo}").format(
                          dateTimeFrom=retval.strip(),
                          dateTo=dateFormat(dateTo),
                          atTimeTo=timeFormat(timeTo, prefix=gettext("at ")))
          return retval.strip()
docs: Returns a string describing when the event occurs (in the local time zone).