- Issue created by @dieterholvoet
- @dieterholvoet opened merge request.
- Status changed to Needs review
almost 2 years ago 5:21pm 16 March 2023 - 🇩🇪Germany daveiano
With the patch applied, the
start_time
andend_time
properties return at least data, in my case the following as an example (actual output is from a GraphQL request, but this should not make any difference):"fieldWhen": [ { "value": 1681115400, "endValue": 1681119000, "startTime": "2023-04-10 10:30:00 Europe/Berlin", "endTime": "2023-04-10 11:30:00 Europe/Berlin", "rrule": null, "rruleIndex": null, "timezone": "", "duration": 60 } ]
Is this the intended output of
start_time
andend_time
? Just asking, I thought this should only return the actual time, eg: 10:30:00? - 🇧🇪Belgium dieterholvoet Brussels
actual output is from a GraphQL request, but this should not make any difference
It does make a difference. If you run the code from the field description you get an instance of
DrupalDateTime
, if you use GraphQL you get the normalized version of that object.I thought this should only return the actual time, eg: 10:30:00?
No, if you look at
SmartDateItem::propertyDefinitions
you'll see thatstart_time
andend_time
are supposed to contain respectively The computed start DateTime object. and The computed end DateTime object.. - First commit to issue fork.
-
mandclu →
committed 8e94cbd6 on 3.7.x authored by
DieterHolvoet →
Issue #3348541 by DieterHolvoet: start_time and end_time properties don'...
-
mandclu →
committed 8e94cbd6 on 3.7.x authored by
DieterHolvoet →
-
mandclu →
committed 305d788e on 4.0.x authored by
DieterHolvoet →
Issue #3348541 by DieterHolvoet: start_time and end_time properties don'...
-
mandclu →
committed 305d788e on 4.0.x authored by
DieterHolvoet →
- Status changed to Fixed
almost 2 years ago 7:54am 26 April 2023 - 🇨🇦Canada mandclu
Thanks very much for the work on this. This has been merged into the 3.7.x and 4.0.x branches.
Automatically closed - issue fixed for 2 weeks with no activity.
- Status changed to Fixed
over 1 year ago 12:14pm 25 August 2023 - 🇧🇪Belgium dieterholvoet Brussels
I just thought of something: shouldn't we consider the timezone stored in the field item when creating the
DateTime
object inDateTimeComputed::getValue()
? If so, I'll create a new issue to fix that. - 🇨🇦Canada mandclu
Ah great point. If a timezone has been provided, it should definitely be considered. Please open a child issue for that.