Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
There is no clean way to initialise the \Drupal\time_field\Time
object straight from a \DateTime
object. From a DX perspective it would be nice to introduce a new constructor createFromDateTime
to initialise the time object from a date time.
Comment | File | Size | Author |
---|---|---|---|
#2 | 3169679-2-create_time_from_date_time.patch | 1.6 KB | Erik Frèrejean |
Comments
Comment #2
Erik FrèrejeanComment #3
liesm CreditAttribution: liesm as a volunteer commentedSeems like an usable change.
Comment #5
BramDriesenThank you all!
Comment #6
BramDriesenComment #7
BramDriesen