Uploaded image for project: 'Airavata'
  1. Airavata
  2. AIRAVATA-3677

time data '2022-01-11T21:20:38Z' does not match format '%Y-%m-%dT%H:%M:%S.%fZ'

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • Django Portal
    • None
    • Easy

    Description

      The Django REST Framework serializes dates to the ISO-8601 format, but it doesn't always include microseconds. This is because it relies on datetime.isoformat which only includes microseconds if microseconds are not 0. However, this behavior, that it sometimes and sometimes does not include microseconds, makes it challenging to parse the returned values.

      For this task, I'll set the DATETIME_FORMAT settings in Django REST Framework to force always include microseconds.

      Attachments

        Activity

          People

            marcuschristie Marcus Christie
            marcuschristie Marcus Christie
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: