Code

Ticket #4433: 4433.patch

File 4433.patch, 571 bytes (added by Krzysztof Sitarski <sit0@…>, 7 years ago)
  • django/db/models/fields/__init__.py

     
    497497    def get_db_prep_save(self, value): 
    498498        # Casts dates into string format for entry into database. 
    499499        if value is not None: 
    500             value = value.strftime('%Y-%m-%d') 
     500            value = time.strptime(value, '%Y-%m-%d') 
    501501        return Field.get_db_prep_save(self, value) 
    502502 
    503503    def get_manipulator_field_objs(self):