def CopyFromDateTimeString(self, time_string):
date_time_values = self._CopyDateTimeFromString(time_string)<EOL>year = date_time_values.get('<STR_LIT>', <NUM_LIT:0>)<EOL>month = date_time_values.get('<STR_LIT>', <NUM_LIT:0>)<EOL>day_of_month = date_time_values.get('<STR_LIT>', <NUM_LIT:0>)<EOL>hours = date_time_values.get('<STR_LIT>', <NUM_LIT:0>)<EOL>minutes = date_time_values.get('<STR_LIT>', <NUM_LIT:0>)<EOL>seconds = date_time_values.get('<STR_LIT>', <NUM_LIT:0>)<EOL>microseconds = date_time_values.get('<STR_LIT>', None)<EOL>if year > <NUM_LIT>:<EOL><INDENT>raise ValueError('<STR_LIT>'.format(year))<EOL><DEDENT>timestamp = self._GetNumberOfSecondsFromElements(<EOL>year, month, day_of_month, hours, minutes, seconds)<EOL>timestamp = float(timestamp) / definitions.SECONDS_PER_DAY<EOL>timestamp += self._DELPHI_TO_POSIX_BASE<EOL>if microseconds is not None:<EOL><INDENT>timestamp += float(microseconds) / definitions.MICROSECONDS_PER_DAY<EOL><DEDENT>self._normalized_timestamp = None<EOL>self._timestamp = timestamp<EOL>self.is_local_time = False<EOL>
Copies a Delphi TDateTime timestamp from a string.

        Args:
          time_string (str): date and time value formatted as:
              YYYY-MM-DD hh:mm:ss.######[+-]##:##

              Where # are numeric digits ranging from 0 to 9 and the seconds
              fraction can be either 3 or 6 digits. The time of day, seconds
              fraction and time zone offset are optional. The default time zone
              is UTC.

        Raises:
          ValueError: if the time string is invalid or not supported.