def _FormatDateTime(self, event):
    """Formats the date and time.

    Args:
      event (EventObject): event.

    Returns:
      str: date and time string or "N/A" if no event timestamp is available.
    """
    if not event.timestamp:
      return 'N/A'

    # TODO: preserve dfdatetime as an object.
    # TODO: add support for self._output_mediator.timezone
    date_time = dfdatetime_posix_time.PosixTimeInMicroseconds(
        timestamp=event.timestamp)

    year, month, day_of_month = date_time.GetDate()
    hours, minutes, seconds = date_time.GetTimeOfDay()

    try:
      return '{0:04d}-{1:02d}-{2:02d} {3:02d}:{4:02d}:{5:02d}'.format(
          year, month, day_of_month, hours, minutes, seconds)
    except (TypeError, ValueError):
      self._ReportEventError(event, (
          'unable to copy timestamp: {0!s} to a human readable date and '
          'time. Defaulting to: "0000-00-00 00:00:00"').format(event.timestamp))

      return '0000-00-00 00:00:00'
Formats the date and time.

    Args:
      event (EventObject): event.

    Returns:
      str: date and time string or "N/A" if no event timestamp is available.