Closed (fixed)
Project:
Drupal core
Version:
8.4.x-dev
Component:
field system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
17 Dec 2017 at 11:05 UTC
Updated:
23 Jan 2018 at 09:42 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
claudiu.cristeaFix.
Comment #3
venkatesh rajan.j commentedComment #4
venkatesh rajan.j commented@claudiu.cristea,
Thanks for the patch. Your patch applied cleanly. PFA for the same.
Schema for timestamp has been added core.data_types.schema.yml file
Comment #5
wim leersThis doesn't live in the
datetimemodule.@Venkatesh Rajan.J: posting screenshots of a succesfully applying patch is not useful. The fact that tests passed already prove that the patch applies successfully.
Comment #6
wim leersActually, this is not just a integer, it's a UNIX timestamp. Which for example means it can't go negative.
i.e. the current config schema refers to:
But this value is actually
\Drupal\Core\TypedData\Plugin\DataType\Timestamp.Because:
Comment #7
mpdonadioIf a system support signed `time_t`, then timestamps can be negative. A negative number represents date/times before 1970-01-01 (see some of the issues about timestamps and the 1901 problem). The 2038 problem is 2^31-1, rolling over into 1901. The Wikipedia article has some more details.
I'm wondering if we need a decent way to detect missing schema definitions. Maybe a meta parent issue to remove most of the wildcards so we can detect problems?
Comment #8
wim leers+1
Comment #9
claudiu.cristea@Wim Leers, Great, I totally missed that data type.
Comment #10
borisson_I don't think the blank line there is needed.
Comment #11
claudiu.cristeaMe neither but I followed the pattern used in the rest of the file.
Comment #12
wim leersNeeds follow-up for #7/#8. But this patch is ready.
Comment #13
larowlanAdding review credit for @Wim Leers for reviews that shaped the patch
Comment #15
larowlanCommitted 1872e83 and pushed to 8.5.x.
Cherry-picked as c671146 and pushed to 8.4.x
Comment #17
larowlanCan we get the follow-up for #7 and #8?
Thanks
Comment #18
mpdonadioCreated #2933548: [META] Find all fields with missing/improper schemas.
Comment #20
claudiu.cristeaUnfortunately, we forgot here to define the
timestampscalar data type. For this reason any test that is trying to import afield.field.*.*configuration for a timestamp field will fail. I've opened a followup to fix this bug in #2938799: Provide the timestamp scalar data type.