Details
-
Bug
-
Resolution: Fixed
-
High
-
2015.12
-
None
-
eZ Platform 15.12
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
Issue Links
- relates to
-
EZP-25270 Viewing an object with time set to "00:00" always present it as "this field is empty"
- Closed
-
EZP-25276 Different timezones on server/local env changes the inserted date
- Closed
-
EZP-25179 DateAndTime field doesn't accept "12:00 AM"
- Closed
-
EZP-23925 Improve the DateAndTime edit view for browsers not supporting date and time HTML5 input
- Closed
-
EZP-25719 Incorrect Date fieldValue when timestamp is set to 0
- Open
- testing discovered
-
EZP-25424 From/to Hash assert on empty values are not strict enough
- Closed
-
EZP-25459 Date field edit view considers 0 as empty
- Closed
- links to