def __set__(self, instance, value):
if self.many is False:<EOL><INDENT>if isinstance(value, str):<EOL><INDENT>value = parse(value)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>datetime_list = []<EOL>for datetime_value in value:<EOL><INDENT>if isinstance(datetime_value, str):<EOL><INDENT>datetime_value = parse(datetime_value)<EOL><DEDENT>datetime_list.append(datetime_value)<EOL><DEDENT>value = datetime_list<EOL><DEDENT>super(DateTimeField, self).__set__(instance, value)<EOL>
Normal descriptor set method
:param instance: Resource instance where the field lives
:param value: Might be a datetime object or a string to be parsed