Opened 7 years ago

Closed 7 years ago

#5675 closed (duplicate)

loaddata cannot cope with the datetime format from dumpdata

Reported by: duncan.parkes@… Owned by: nobody
Component: Core (Serialization) Version: master
Severity: Keywords:
Cc: sam@… Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

If a table containing dates with fractions of seconds is dumped using dumpdata, it cannot be loaded back as a fixture using loaddata, which gives the following error message:

Problem installing fixture '<some stuff>/fixtures/test.json': [u'Enter a valid date/time in YYYY-MM-DD HH:MM format.']

The actual date from dumpdata is in this format:

2007-10-02 13:41:16.678449

Change History (2)

comment:1 Changed 7 years ago by anonymous

  • Cc sam@… added
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

comment:2 Changed 7 years ago by russellm

  • Resolution set to duplicate
  • Status changed from new to closed

I'm fairly certain that this is a duplicate of #5553 which was fixed in [6406]. We have tests that validate against the behaviour you describe. If you are using a more recent SVN revision, feel free to reopen this ticket - if possible, providing a test case (a diff to modeltests/serializers would be ideal), along with database and OS details.

Note: See TracTickets for help on using tickets.
Back to Top