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>', <NUM_LIT:0>)<EOL>deciseconds, _ = divmod(<EOL>microseconds, definitions.MICROSECONDS_PER_DECISECOND)<EOL>if year < <NUM_LIT:0> or year > <NUM_LIT>:<EOL><INDENT>raise ValueError('<STR_LIT>'.format(year))<EOL><DEDENT>self._normalized_timestamp = None<EOL>self._number_of_seconds = self._GetNumberOfSecondsFromElements(<EOL>year, month, day_of_month, hours, minutes, seconds)<EOL>self.year = year<EOL>self.month = month<EOL>self.day_of_month = day_of_month<EOL>self.hours = hours<EOL>self.minutes = minutes<EOL>self.seconds = seconds<EOL>self.deciseconds = deciseconds<EOL>self.is_local_time = False<EOL>
Copies a RFC2579 date-time from a date and time 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 date string is invalid or not supported.