def _ParseSystemTime(self, byte_stream):
    """Parses a SYSTEMTIME date and time value from a byte stream.

    Args:
      byte_stream (bytes): byte stream.

    Returns:
      dfdatetime.Systemtime: SYSTEMTIME date and time value or None if no
          value is set.

    Raises:
      ParseError: if the SYSTEMTIME could not be parsed.
    """
    systemtime_map = self._GetDataTypeMap('systemtime')

    try:
      systemtime = self._ReadStructureFromByteStream(
          byte_stream, 0, systemtime_map)
    except (ValueError, errors.ParseError) as exception:
      raise errors.ParseError(
          'Unable to parse SYSTEMTIME value with error: {0!s}'.format(
              exception))

    system_time_tuple = (
        systemtime.year, systemtime.month, systemtime.weekday,
        systemtime.day_of_month, systemtime.hours, systemtime.minutes,
        systemtime.seconds, systemtime.milliseconds)

    if system_time_tuple == self._EMPTY_SYSTEM_TIME_TUPLE:
      return None

    try:
      return dfdatetime_systemtime.Systemtime(
          system_time_tuple=system_time_tuple)
    except ValueError:
      raise errors.ParseError(
          'Invalid SYSTEMTIME value: {0!s}'.format(system_time_tuple))
def _ParseSystemTime ( self , byte_stream ) : systemtime_map = self . _GetDataTypeMap ( 'systemtime' ) try : systemtime = self . _ReadStructureFromByteStream ( byte_stream , 0 , systemtime_map ) except ( ValueError , errors . ParseError ) as exception : raise errors . ParseError ( 'Unable to parse SYSTEMTIME value with error: {0!s}' . format ( exception ) ) system_time_tuple = ( systemtime . year , systemtime . month , systemtime . weekday , systemtime . day_of_month , systemtime . hours , systemtime . minutes , systemtime . seconds , systemtime . milliseconds ) if system_time_tuple == self . _EMPTY_SYSTEM_TIME_TUPLE : return None try : return dfdatetime_systemtime . Systemtime ( system_time_tuple = system_time_tuple ) except ValueError : raise errors . ParseError ( 'Invalid SYSTEMTIME value: {0!s}' . format ( system_time_tuple ) )
Parses a SYSTEMTIME date and time value from a byte stream.

    Args:
      byte_stream (bytes): byte stream.

    Returns:
      dfdatetime.Systemtime: SYSTEMTIME date and time value or None if no
          value is set.

    Raises:
      ParseError: if the SYSTEMTIME could not be parsed.