jhedstrom / DrupalDriver

A collection of drivers for controlling Drupal.
GNU General Public License v2.0
64 stars 95 forks source link

Issue 200 fix issue with creation of date only fields #201

Open amitsharmadoj opened 5 years ago

amitsharmadoj commented 5 years ago

Fix issue 200 (https://github.com/jhedstrom/DrupalDriver/issues/200), an issue with the creation of date only fields

jhedstrom commented 5 years ago

The reason the old code uses that format is that even for date-only fields, the actual storage has the entire date and time string.

amitsharmadoj commented 5 years ago

Yes this is what my understanding is. Ideally date-only fields should have been created with and without the timestamp but not happening with timestamp for me. Perhaps there is a change in Drupal core 8.6.x the way it handles the Date.

MPParsley commented 4 years ago

Running into the same issue, I have a date only field but I can set the value:

    When I am viewing a "page" content:
      | langcode   | nl         |
      | title      | Title.     |
      | field_date | 2020-07-14 |

field_date remains empty.

This patch fixed the issue.