Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-25375

Timestamps 0 are not handled properly

    XMLWordPrintable

Details

    Description

      if one has an ezdatetime as Required, no content can be created using 00:00 as the time part.

      Steps to reproduce:
      • create a custom Content Type
      • add an ezdatetime, marked as Required with Empty as default value
      • attempt to create content, setting the value as 1/1/1990 00:00 (for instance)
        => Publishing operation will fail with the following error message
        {
            "ErrorMessage": {
                "_media-type": "application\/vnd.ez.api.ErrorMessage+json",
                "errorCode": 400,
                "errorMessage": "Bad Request",
                "errorDescription": "Value for required field definition 'my_date_time_field' with language 'eng-GB' is empty",
        ....
            }
        }
        

      The same problems happens on Time fields (actually that's even worse because the kernel also has a bug on handling this case)

      Also the display of empty Time and date and Time fields must be fixed (as explained in EZP-25270).

      • Create a ContentType with a "Time" a "Date and Time" field.
      • Create a new content based on this content type.
      • As time use 00:00
      • As dateandtime use 01/01/1970 00:00 on UTC time. So consider your timezone while entering, for example on my timezone (France in daylight saving time) I had to enter 01/01/1970 01:00

      Attachments

        Activity

          People

            Unassigned Unassigned
            joaquim.cavalleri-obsolete@ez.no Joaquim Cavalleri (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: